Initial commit
This commit is contained in:
16
srcs/RobotNet10/Shared/RobotNet.VDA5050/BrokerSetting.cs
Normal file
16
srcs/RobotNet10/Shared/RobotNet.VDA5050/BrokerSetting.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace RobotNet.VDA5050;
|
||||
|
||||
public record BrokerSetting
|
||||
{
|
||||
public string HostServer { get; set; } = string.Empty;
|
||||
public int Port { get; set; } = 1883;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public int PublishRepeat { get; set; }
|
||||
public bool EnablePassword { get; set; }
|
||||
public bool EnableTls { get; set; }
|
||||
public bool EnableSSLSecure { get; set; }
|
||||
public string? CAFile { get; set; }
|
||||
public string? CerFile { get; set; }
|
||||
public string? KeyFile { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Connection;
|
||||
|
||||
public class ConnectionMsg
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("headerId")]
|
||||
public uint HeaderId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonConverter(typeof(DateTimeConverter))]
|
||||
[JsonPropertyName("timestamp")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("manufacturer")]
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("serialNumber")]
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("connectionState")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public ConnectionState ConnectionState { get; set; }
|
||||
}
|
||||
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/DateTimeConverter.cs
Normal file
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/DateTimeConverter.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050;
|
||||
|
||||
public class DateTimeConverter : JsonConverter<DateTime>
|
||||
{
|
||||
private const string Format = "yyyy-MM-ddTHH:mm:ss.fffZ";
|
||||
|
||||
public override DateTime Read(ref Utf8JsonReader reader, System.Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
var str = reader.GetString();
|
||||
if (str != null && str.EndsWith('Z'))
|
||||
{
|
||||
str = str[..^1];
|
||||
return DateTime.ParseExact(str, "yyyy-MM-ddTHH:mm:ss.fff", null, System.Globalization.DateTimeStyles.AssumeUniversal);
|
||||
}
|
||||
return DateTime.Parse(str!, null, System.Globalization.DateTimeStyles.AssumeUniversal);
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
|
||||
{
|
||||
var utc = value.ToUniversalTime();
|
||||
writer.WriteStringValue(utc.ToString(Format));
|
||||
}
|
||||
}
|
||||
58
srcs/RobotNet10/Shared/RobotNet.VDA5050/EnumHelper.cs
Normal file
58
srcs/RobotNet10/Shared/RobotNet.VDA5050/EnumHelper.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.Reflection;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050;
|
||||
|
||||
public static class EnumHelper
|
||||
{
|
||||
public static string ToJsonString(this VDA5050Topic enumValue)
|
||||
{
|
||||
var type = enumValue.GetType();
|
||||
var memberInfo = type.GetMember(enumValue.ToString()).FirstOrDefault();
|
||||
|
||||
if (memberInfo == null) return enumValue.ToString();
|
||||
|
||||
var attribute = memberInfo.GetCustomAttribute<JsonStringEnumMemberNameAttribute>();
|
||||
return attribute?.Name ?? enumValue.ToString();
|
||||
}
|
||||
|
||||
public static string ToJsonString(this Enum enumValue)
|
||||
{
|
||||
var type = enumValue.GetType();
|
||||
var memberInfo = type.GetMember(enumValue.ToString()).FirstOrDefault();
|
||||
|
||||
if (memberInfo == null) return enumValue.ToString();
|
||||
|
||||
var attribute = memberInfo.GetCustomAttribute<JsonStringEnumMemberNameAttribute>();
|
||||
return attribute?.Name ?? enumValue.ToString();
|
||||
}
|
||||
|
||||
private static readonly Dictionary<string, ActionType> Cache = BuildCache();
|
||||
|
||||
private static Dictionary<string, ActionType> BuildCache()
|
||||
{
|
||||
var result = new Dictionary<string, ActionType>();
|
||||
|
||||
foreach (ActionType value in Enum.GetValues<ActionType>())
|
||||
{
|
||||
var field = typeof(ActionType).GetField(value.ToString());
|
||||
var attribute = field?.GetCustomAttribute<JsonStringEnumMemberNameAttribute>();
|
||||
|
||||
if (attribute != null)
|
||||
{
|
||||
result[attribute.Name] = value;
|
||||
}
|
||||
|
||||
// Cũng thêm tên enum gốc để hỗ trợ cả hai
|
||||
result[value.ToString()] = value;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool TryParse(string value, out ActionType result)
|
||||
{
|
||||
return Cache.TryGetValue(value, out result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
|
||||
public class ActionParameter
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("key")]
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("valueDataType")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public ValueDataType ValueDataType { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("isOptional")]
|
||||
public bool IsOptional { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class AgvAction
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("actionType")]
|
||||
public string ActionType { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("actionDescription")]
|
||||
public string ActionDescription { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actionScopes")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public ActionScope[] ActionScopes { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("actionParameters")]
|
||||
public ActionParameter[] ActionParameters { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("resultDescription")]
|
||||
public string ResultDescription { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("blockingTypes")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public BlockingType[] BlockingTypes { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
|
||||
public class AgvGeometry
|
||||
{
|
||||
[JsonPropertyName("wheelDefinitions")]
|
||||
public WheelDefinition[] WheelDefinitions { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("envelopes2d")]
|
||||
public Envelopes2d[] Envelopes2d { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("envelopes3d")]
|
||||
public Envelopes3d[] Envelopes3d { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class BoundingBoxReference
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("y")]
|
||||
public double Y { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("z")]
|
||||
public double Z { get; set; }
|
||||
|
||||
[JsonPropertyName("theta")]
|
||||
public double Theta { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class PolygonPoint
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
[JsonPropertyName("y")]
|
||||
[Required]
|
||||
public double Y { get; set; }
|
||||
}
|
||||
|
||||
public class Envelopes2d
|
||||
{
|
||||
[JsonPropertyName("set")]
|
||||
[Required]
|
||||
public string Set { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("polygonPoints")]
|
||||
[Required]
|
||||
public PolygonPoint[] PolygonPoints { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class Envelopes3d
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("set")]
|
||||
public string Set { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("format")]
|
||||
public string Format { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("data")]
|
||||
public object? Data { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
|
||||
public class FactSheetMsg
|
||||
{
|
||||
[JsonPropertyName("headerId")]
|
||||
public uint HeaderId { get; set; }
|
||||
|
||||
[JsonPropertyName("timestamp")]
|
||||
[JsonConverter(typeof(DateTimeConverter))]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("manufacturer")]
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("serialNumber")]
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("typeSpecification")]
|
||||
public TypeSpecification TypeSpecification { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("physicalParameters")]
|
||||
public PhysicalParameter PhysicalParameters { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("protocolLimits")]
|
||||
public ProtocolLimits ProtocolLimits { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("protocolFeatures")]
|
||||
public ProtocolFeatures ProtocolFeatures { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("agvGeometry")]
|
||||
public AgvGeometry AgvGeometry { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("loadSpecification")]
|
||||
public LoadSpecification LoadSpecification { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("vehicleConfig")]
|
||||
public VehicleConfig VehicleConfig { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class LoadDimensions
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("length")]
|
||||
public double Length { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("width")]
|
||||
public double Width { get; set; }
|
||||
|
||||
[JsonPropertyName("height")]
|
||||
public double Height { get; set; }
|
||||
|
||||
}
|
||||
61
srcs/RobotNet10/Shared/RobotNet.VDA5050/Factsheet/LoadSet.cs
Normal file
61
srcs/RobotNet10/Shared/RobotNet.VDA5050/Factsheet/LoadSet.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class LoadSet
|
||||
{
|
||||
[JsonPropertyName("setName")]
|
||||
public string SetName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("loadType")]
|
||||
public string LoadType { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("loadPositions")]
|
||||
public string[] LoadPositions { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("boundingBoxReference")]
|
||||
public BoundingBoxReference BoundingBoxReference { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("loadDimensions")]
|
||||
public LoadDimensions LoadDimensions { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("maxWeight")]
|
||||
public double MaxWeigth { get; set; }
|
||||
|
||||
[JsonPropertyName("minLoadhandlingHeight")]
|
||||
public double MinLoadhandlingHeight { get; set; }
|
||||
|
||||
[JsonPropertyName("maxLoadhandlingHeight")]
|
||||
public double MaxLoadhandlingHeight { get; set; }
|
||||
|
||||
[JsonPropertyName("minLoadhandlingDepth")]
|
||||
public double MinLoadhandlingDepth { get; set; }
|
||||
|
||||
[JsonPropertyName("maxLoadhandlingDepth")]
|
||||
public double MaxLoadhandlingDepth { get; set; }
|
||||
|
||||
[JsonPropertyName("minLoadhandlingTilt")]
|
||||
public double MinLoadhandlingTilt { get; set; }
|
||||
|
||||
[JsonPropertyName("maxLoadhandlingTilt")]
|
||||
public double MaxLoadhandlingTilt { get; set; }
|
||||
|
||||
[JsonPropertyName("agvSpeedLimit")]
|
||||
public double AgvSpeedLimit { get; set; }
|
||||
|
||||
[JsonPropertyName("agvAccelerationLimit")]
|
||||
public double AgvAccelerationLimit { get; set; }
|
||||
|
||||
[JsonPropertyName("agvDecelerationLimit")]
|
||||
public double AgvDecelerationLimit { get; set; }
|
||||
|
||||
[JsonPropertyName("pickTime")]
|
||||
public double PickTime { get; set; }
|
||||
|
||||
[JsonPropertyName("dropTime")]
|
||||
public double DropTime { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
|
||||
public class LoadSpecification
|
||||
{
|
||||
[JsonPropertyName("loadPositions")]
|
||||
public string[] LoadPositions { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("loadSets")]
|
||||
public LoadSet[] LoadSets { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class OrderMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("nodes")]
|
||||
public int Nodes { get; set; }
|
||||
|
||||
[JsonPropertyName("edges")]
|
||||
public int Edges { get; set; }
|
||||
}
|
||||
public class NodeMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("actions")]
|
||||
public int Actions { get; set; }
|
||||
}
|
||||
|
||||
public class EdgeMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("actions")]
|
||||
public int Actions { get; set; }
|
||||
}
|
||||
|
||||
public class ActionMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("actionsParameters")]
|
||||
public int ActionsParameters { get; set; }
|
||||
}
|
||||
|
||||
public class TrajectoryMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("knotVector")]
|
||||
public int KnotVector { get; set; }
|
||||
|
||||
[JsonPropertyName("controlPoints")]
|
||||
public int ControlPoints { get; set; }
|
||||
}
|
||||
|
||||
public class StateMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("nodeStates")]
|
||||
public int NodeStates { get; set; }
|
||||
|
||||
[JsonPropertyName("edgeStates")]
|
||||
public int EdgeStates { get; set; }
|
||||
|
||||
[JsonPropertyName("loads")]
|
||||
public int Loads { get; set; }
|
||||
|
||||
[JsonPropertyName("actionStates")]
|
||||
public int ActionStates { get; set; }
|
||||
|
||||
[JsonPropertyName("errors")]
|
||||
public int Errors { get; set; }
|
||||
|
||||
[JsonPropertyName("information")]
|
||||
public int Information { get; set; }
|
||||
|
||||
[JsonPropertyName("errorReferences")]
|
||||
public int ErrorReferences { get; set; }
|
||||
}
|
||||
|
||||
public class InformationMaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("infoReferences")]
|
||||
public int InfoReferences { get; set; }
|
||||
}
|
||||
|
||||
public class MaxArrayLens
|
||||
{
|
||||
[JsonPropertyName("order")]
|
||||
public OrderMaxArrayLens Order { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("node")]
|
||||
public NodeMaxArrayLens Node { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("edge")]
|
||||
public EdgeMaxArrayLens Edge { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("action")]
|
||||
public ActionMaxArrayLens Action { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("instantActions")]
|
||||
public int InstantActions { get; set; }
|
||||
|
||||
[JsonPropertyName("trajectory")]
|
||||
public TrajectoryMaxArrayLens Trajectory { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("state")]
|
||||
public StateMaxArrayLens State { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("information")]
|
||||
public InformationMaxArrayLens Information { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class MaxStringLens
|
||||
{
|
||||
[JsonPropertyName("msgLen")]
|
||||
public int MsgLen { get; set; }
|
||||
|
||||
[JsonPropertyName("topicSerialLen")]
|
||||
public int TopicSerialLen { get; set; }
|
||||
|
||||
[JsonPropertyName("topicElemLen")]
|
||||
public int TopicElemLen { get; set; }
|
||||
|
||||
[JsonPropertyName("idLen")]
|
||||
public int IdLen { get; set; }
|
||||
|
||||
[JsonPropertyName("idNumericalOnly")]
|
||||
public bool IdNumericalOnly { get; set; }
|
||||
|
||||
[JsonPropertyName("enumLen")]
|
||||
public int EnumLen { get; set; }
|
||||
|
||||
[JsonPropertyName("loadIdLen")]
|
||||
public int LoadIdLen { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
|
||||
public class OptionalParameter
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("parameter")]
|
||||
public string Parameter { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("support")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public Support Support { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class PhysicalParameter
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("speedMin")]
|
||||
public double SpeedMin { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("speedMax")]
|
||||
public double SpeedMax { get; set; }
|
||||
|
||||
[JsonPropertyName("angularSpeedMin")]
|
||||
public double AngularSpeedMin { get; set; }
|
||||
|
||||
[JsonPropertyName("angularSpeedMax")]
|
||||
public double AngularSpeedMax { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("accelerationMax")]
|
||||
public double AccelerationMax { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("decelerationMax")]
|
||||
public double DecelerationMax { get; set; }
|
||||
|
||||
[JsonPropertyName("heightMin")]
|
||||
public double HeightMin { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("heightMax")]
|
||||
public double HeightMax { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("width")]
|
||||
public double Width { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("length")]
|
||||
public double Length { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
|
||||
public class ProtocolFeatures
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("optionalParameters")]
|
||||
public OptionalParameter[] OptionalParameters { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("agvActions")]
|
||||
public AgvAction[] AgvActions { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class ProtocolLimits
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("maxStringLens")]
|
||||
public MaxStringLens MaxStringLens { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("maxArrayLens")]
|
||||
public MaxArrayLens MaxArrayLens { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("timing")]
|
||||
public Timing Timing { get; set; } = new();
|
||||
}
|
||||
21
srcs/RobotNet10/Shared/RobotNet.VDA5050/Factsheet/Timing.cs
Normal file
21
srcs/RobotNet10/Shared/RobotNet.VDA5050/Factsheet/Timing.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class Timing
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("minOrderInterval")]
|
||||
public double MinOrderInterval { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("minStateInterval")]
|
||||
public double MinStateInterval { get; set; }
|
||||
|
||||
[JsonPropertyName("defaultStateInterval")]
|
||||
public double DefaultStateInterval { get; set; }
|
||||
|
||||
[JsonPropertyName("visualizationInterval")]
|
||||
public double VisualizationInterval { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class TypeSpecification
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("seriesName")]
|
||||
public string SeriesName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("seriesDescription")]
|
||||
public string SeriesDescription { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("agvKinematic")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public AgvKinematic AgvKinematic { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("agvClass")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public AgvClass AgvClass { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("maxLoadMass")]
|
||||
public double MaxLoadMass { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("localizationTypes")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public LocalizationType[] LocalizationTypes { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("navigationTypes")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public NavigationType[] NavigationTypes { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class Version
|
||||
{
|
||||
[JsonPropertyName("key")]
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("value")]
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Network
|
||||
{
|
||||
[JsonPropertyName("dnsServers")]
|
||||
public string[] DnsServers { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("ntpServers")]
|
||||
public string[] NtpServers { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("localIpAddress")]
|
||||
public string LocalIpAddress { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("netmask")]
|
||||
public string Netmask { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("defaultGateway")]
|
||||
public string DefaultGateway { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class VehicleConfig
|
||||
{
|
||||
[JsonPropertyName("versions")]
|
||||
public Version[] Versions { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("network")]
|
||||
public Network Network { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Factsheet;
|
||||
|
||||
public class WheelDefinitionsPosition
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
[JsonPropertyName("y")]
|
||||
[Required]
|
||||
public double Y { get; set; }
|
||||
|
||||
[JsonPropertyName("theta")]
|
||||
public double Theta { get; set; }
|
||||
}
|
||||
|
||||
public class WheelDefinition
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("type")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public WheelDefinitionsType Type { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("isActiveDriven")]
|
||||
public bool IsActiveDriven { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("isActiveSteered")]
|
||||
public bool IsActiveSteered { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("position")]
|
||||
public WheelDefinitionsPosition Position { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("diameter")]
|
||||
public double Diameter { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("width")]
|
||||
public double Width { get; set; }
|
||||
|
||||
[JsonPropertyName("centerDisplacement")]
|
||||
public double CenterDisplacement { get; set; }
|
||||
|
||||
[JsonPropertyName("constraints")]
|
||||
public string Constraints { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.InstantAction;
|
||||
|
||||
public class Action
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("actionType")]
|
||||
public string ActionType { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actionId")]
|
||||
public string ActionId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("actionDescription")]
|
||||
public string? ActionDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("blockingType")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public BlockingType BlockingType { get; set; }
|
||||
|
||||
[JsonPropertyName("actionParameters")]
|
||||
public ActionParameter[]? ActionParameters { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.InstantAction;
|
||||
|
||||
/// <summary>
|
||||
/// Action data transfer object for VDMA LIF actions
|
||||
/// Used in VehicleType.Actions, NodeVehicleProperty.Actions, EdgeVehicleProperty.Actions
|
||||
/// </summary>
|
||||
public class ActionLIF
|
||||
{
|
||||
/// <summary>
|
||||
/// Type of action (e.g., "pick", "drop", "charge")
|
||||
/// </summary>
|
||||
[JsonPropertyName("actionType")]
|
||||
public string ActionType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Description of the action
|
||||
/// </summary>
|
||||
[JsonPropertyName("actionDescription")]
|
||||
public string? ActionDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Requirement type: REQUIRED, CONDITIONAL, OPTIONAL
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[JsonPropertyName("requirementType")]
|
||||
public RequirementType RequirementType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Blocking type: NONE, SOFT, HARD
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[JsonPropertyName("blockingType")]
|
||||
public BlockingType BlockingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Action parameters as key-value pairs
|
||||
/// </summary>
|
||||
[JsonPropertyName("actionParameters")]
|
||||
public List<ActionParameter> ActionParameters { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.InstantAction;
|
||||
|
||||
public class ActionParameter
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("key")]
|
||||
public string Key { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("value")]
|
||||
public string Value { get; set; } = "";
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.InstantAction;
|
||||
|
||||
public class InstantActionsMsg
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("headerId")]
|
||||
public uint HeaderId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonConverter(typeof(DateTimeConverter))]
|
||||
[JsonPropertyName("timestamp")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("manufacturer")]
|
||||
public string Manufacturer { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("serialNumber")]
|
||||
public string SerialNumber { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actions")]
|
||||
public Action[] Actions { get; set; } = [];
|
||||
}
|
||||
18
srcs/RobotNet10/Shared/RobotNet.VDA5050/JsonOptionExtends.cs
Normal file
18
srcs/RobotNet10/Shared/RobotNet.VDA5050/JsonOptionExtends.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace RobotNet.VDA5050;
|
||||
|
||||
public class JsonOptionExtends
|
||||
{
|
||||
public static readonly JsonSerializerOptions Read = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
WriteIndented = true,
|
||||
};
|
||||
|
||||
public static readonly JsonSerializerOptions Write = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
WriteIndented = true,
|
||||
};
|
||||
}
|
||||
21
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Corridor.cs
Normal file
21
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Corridor.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Order;
|
||||
|
||||
|
||||
public class Corridor
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("leftWidth")]
|
||||
public double LeftWidth { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("rightWidth")]
|
||||
public double RightWidth { get; set; }
|
||||
|
||||
[JsonPropertyName("corridorRefPoint")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public CorridorRefPoint CorridorRefPoint { get; set; }
|
||||
}
|
||||
67
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Edge.cs
Normal file
67
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Edge.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Order;
|
||||
|
||||
public class Edge
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("edgeId")]
|
||||
public string EdgeId { get; set; } = string.Empty;
|
||||
[Required]
|
||||
[JsonPropertyName("sequenceId")]
|
||||
public int SequenceId { get; set; }
|
||||
|
||||
[JsonPropertyName("edgeDescription")]
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("released")]
|
||||
public bool Released { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("startNodeId")]
|
||||
public string StartNodeId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("endNodeId")]
|
||||
public string EndNodeId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("maxSpeed")]
|
||||
public double? MaxSpeed { get; set; }
|
||||
|
||||
[JsonPropertyName("maxHeight")]
|
||||
public double? MaxHeight { get; set; }
|
||||
|
||||
[JsonPropertyName("minHeight")]
|
||||
public double? MinHeight { get; set; }
|
||||
|
||||
[JsonPropertyName("orientation")]
|
||||
public double? Orientation { get; set; }
|
||||
|
||||
[JsonPropertyName("orientationType")]
|
||||
public OrientationType? OrientationType { get; set; }
|
||||
|
||||
[JsonPropertyName("direction")]
|
||||
public string? Direction { get; set; }
|
||||
|
||||
[JsonPropertyName("rotationAllowed")]
|
||||
public bool? RotationAllowed { get; set; }
|
||||
|
||||
[JsonPropertyName("maxRotationSpeed")]
|
||||
public double? MaxRotationSpeed { get; set; }
|
||||
|
||||
[JsonPropertyName("trajectory")]
|
||||
public Trajectory? Trajectory { get; set; }
|
||||
|
||||
[JsonPropertyName("length")]
|
||||
public double? Length { get; set; }
|
||||
|
||||
[JsonPropertyName("corridor")]
|
||||
public Corridor? Corridor { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actions")]
|
||||
public InstantAction.Action[] Actions { get; set; } = [];
|
||||
}
|
||||
29
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Node.cs
Normal file
29
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Node.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Order;
|
||||
|
||||
public class Node
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("nodeId")]
|
||||
public string NodeId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("sequenceId")]
|
||||
public int SequenceId { get; set; }
|
||||
|
||||
[JsonPropertyName("nodeDescription")]
|
||||
public string? NodeDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("released")]
|
||||
public bool Released { get; set; }
|
||||
|
||||
[JsonPropertyName("nodePosition")]
|
||||
public NodePosition? NodePosition { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actions")]
|
||||
public InstantAction.Action[] Actions { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Order;
|
||||
|
||||
|
||||
public class NodePosition
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("y")]
|
||||
public double Y { get; set; }
|
||||
|
||||
[JsonPropertyName("theta")]
|
||||
public double? Theta { get; set; }
|
||||
|
||||
[JsonPropertyName("allowedDeviationXY")]
|
||||
public double? AllowedDeviationXY { get; set; }
|
||||
|
||||
[JsonPropertyName("allowedDeviationTheta")]
|
||||
public double? AllowedDeviationTheta { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("mapId")]
|
||||
public string MapId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("mapDescription")]
|
||||
public string? MapDescription { get; set; }
|
||||
}
|
||||
48
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/OrderMsg.cs
Normal file
48
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/OrderMsg.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Order;
|
||||
|
||||
public class OrderMsg
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("headerId")]
|
||||
public uint HeaderId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonConverter(typeof(DateTimeConverter))]
|
||||
[JsonPropertyName("timestamp")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("manufacturer")]
|
||||
public string Manufacturer { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("serialNumber")]
|
||||
public string SerialNumber { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("orderId")]
|
||||
public string OrderId { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("orderUpdateId")]
|
||||
public int OrderUpdateId { get; set; }
|
||||
|
||||
[JsonPropertyName("zoneSetId")]
|
||||
public string? ZoneSetId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("nodes")]
|
||||
public Node[] Nodes { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("edges")]
|
||||
public Edge[] Edges { get; set; } = [];
|
||||
|
||||
}
|
||||
33
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Trajectory.cs
Normal file
33
srcs/RobotNet10/Shared/RobotNet.VDA5050/Order/Trajectory.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Order;
|
||||
|
||||
public class ControlPoint
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("y")]
|
||||
public double Y { get; set; }
|
||||
|
||||
[JsonPropertyName("weight")]
|
||||
public double? Weight { get; set; }
|
||||
}
|
||||
|
||||
public class Trajectory
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("degree")]
|
||||
public int Degree { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("knotVector")]
|
||||
public double[] KnotVector { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("controlPoints")]
|
||||
public ControlPoint[] ControlPoints { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/ActionState.cs
Normal file
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/ActionState.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
public class ActionState
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("actionId")]
|
||||
public string ActionId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("actionType")]
|
||||
public string ActionType { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("actionDescription")]
|
||||
public string? ActionDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actionStatus")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public ActionStatus ActionStatus { get; set; }
|
||||
|
||||
[JsonPropertyName("resultDescription")]
|
||||
public string ResultDescription { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
public class BatteryState
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("batteryCharge")]
|
||||
public double BatteryCharge { get; set; }
|
||||
|
||||
[JsonPropertyName("batteryVoltage")]
|
||||
public double? BatteryVoltage { get; set; }
|
||||
|
||||
[Range(0, 100, ErrorMessage = "Value for BatteryHealth must be between 0 and 100.")]
|
||||
[JsonPropertyName("batteryHealth")]
|
||||
public double BatteryHealth { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("charging")]
|
||||
public bool Charging { get; set; }
|
||||
|
||||
[JsonPropertyName("reach")]
|
||||
public double? Reach { get; set; }
|
||||
}
|
||||
27
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/EdgeState.cs
Normal file
27
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/EdgeState.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using RobotNet.VDA5050.Order;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
public class EdgeState
|
||||
{
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("edgeId")]
|
||||
public string EdgeId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("sequenceId")]
|
||||
public int SequenceId { get; set; }
|
||||
|
||||
[JsonPropertyName("edgeDescription")]
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("released")]
|
||||
public bool Released { get; set; }
|
||||
|
||||
[JsonPropertyName("trajectory")]
|
||||
public Trajectory? Trajectory { get; set; }
|
||||
}
|
||||
38
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Error.cs
Normal file
38
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Error.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
|
||||
public class ErrorReference
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("referenceKey")]
|
||||
public string ReferenceKey { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("referenceValue")]
|
||||
public string ReferenceValue { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Error
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("errorType")]
|
||||
public string ErrorType { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("errorReferences")]
|
||||
public ErrorReference[]? ErrorReferences { get; set; }
|
||||
|
||||
[JsonPropertyName("errorDescription")]
|
||||
public string? ErrorDescription { get; set; }
|
||||
|
||||
[JsonPropertyName("errorHint")]
|
||||
public string? ErrorHint { get; set; }
|
||||
|
||||
[JsonPropertyName("errorLevel")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[Required]
|
||||
public ErrorLevel ErrorLevel { get; set; }
|
||||
}
|
||||
35
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Information.cs
Normal file
35
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Information.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
|
||||
public class InfomationReference
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("referenceKey")]
|
||||
public string ReferenceKey { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("referenceValue")]
|
||||
public string ReferenceValue { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Information
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("infoType")]
|
||||
public string InfoType { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("infoReferences")]
|
||||
public InfomationReference[]? InfoReferences { get; set; }
|
||||
|
||||
[JsonPropertyName("infoDescription")]
|
||||
public string? InfoDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("infoLevel")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public InfoLevel InfoLevel { get; set; }
|
||||
}
|
||||
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Load.cs
Normal file
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Load.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using RobotNet.VDA5050.Factsheet;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
public class Load
|
||||
{
|
||||
[JsonPropertyName("loadId")]
|
||||
public string? LoadId { get; set; }
|
||||
|
||||
[JsonPropertyName("loadType")]
|
||||
public string? LoadType { get; set; }
|
||||
|
||||
[JsonPropertyName("loadPosition")]
|
||||
public string? LoadPosition { get; set; }
|
||||
|
||||
[JsonPropertyName("boundingBoxReference")]
|
||||
public BoundingBoxReference? BoundingBoxReference { get; set; }
|
||||
|
||||
[JsonPropertyName("loadDimensions")]
|
||||
public LoadDimensions? LoadDimensions { get; set; }
|
||||
|
||||
[JsonPropertyName("weight")]
|
||||
public double? Weight { get; set; }
|
||||
|
||||
}
|
||||
25
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Map.cs
Normal file
25
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/Map.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
|
||||
public class Map
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("mapId")]
|
||||
public string MapId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("mapVersion")]
|
||||
public string MapVersion { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("mapDescription")]
|
||||
public string? MapDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("mapStatus")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public MapStatus MapStatus { get; set; }
|
||||
}
|
||||
27
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/NodeState.cs
Normal file
27
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/NodeState.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using RobotNet.VDA5050.Order;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
|
||||
public class NodeState
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("nodeId")]
|
||||
public string NodeId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("sequenceId")]
|
||||
public int SequenceId { get; set; }
|
||||
|
||||
[JsonPropertyName("nodeDescription")]
|
||||
public string? NodeDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("released")]
|
||||
public bool Released { get; set; }
|
||||
|
||||
[JsonPropertyName("nodePosition")]
|
||||
public NodePosition? NodePosition { get; set; } = new();
|
||||
}
|
||||
17
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/SafetyState.cs
Normal file
17
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/SafetyState.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
public class SafetyState
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("eStop")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public EStop EStop { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("fieldViolation")]
|
||||
public bool FieldViolation { get; set; }
|
||||
}
|
||||
103
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/StateMsg.cs
Normal file
103
srcs/RobotNet10/Shared/RobotNet.VDA5050/State/StateMsg.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using RobotNet.VDA5050.Visualization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.State;
|
||||
|
||||
public class StateMsg
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("headerId")]
|
||||
public uint HeaderId { get; set; }
|
||||
|
||||
[JsonConverter(typeof(DateTimeConverter))]
|
||||
[JsonPropertyName("timestamp")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("manufacturer")]
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("serialNumber")]
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("maps")]
|
||||
public Map[]? Maps { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("orderId")]
|
||||
public string OrderId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("orderUpdateId")]
|
||||
public int OrderUpdateId { get; set; }
|
||||
|
||||
[JsonPropertyName("zoneSetId")]
|
||||
public string? ZoneSetId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("lastNodeId")]
|
||||
public string LastNodeId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("lastNodeSequenceId")]
|
||||
public int LastNodeSequenceId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("driving")]
|
||||
public bool Driving { get; set; }
|
||||
|
||||
[JsonPropertyName("paused")]
|
||||
public bool Paused { get; set; }
|
||||
|
||||
[JsonPropertyName("newBaseRequest")]
|
||||
public bool NewBaseRequest { get; set; }
|
||||
|
||||
[JsonPropertyName("distanceSinceLastNode")]
|
||||
public double? DistanceSinceLastNode { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("operatingMode")]
|
||||
public string OperatingMode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("nodeStates")]
|
||||
public NodeState[] NodeStates { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("edgeStates")]
|
||||
public EdgeState[] EdgeStates { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("agvPosition")]
|
||||
public AgvPosition AgvPosition { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("velocity")]
|
||||
public Velocity Velocity { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("loads")]
|
||||
public Load[] Loads { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("actionStates")]
|
||||
public ActionState[] ActionStates { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("batteryState")]
|
||||
public BatteryState BatteryState { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("errors")]
|
||||
public Error[] Errors { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("information")]
|
||||
public Information[] Information { get; set; } = [];
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("safetyState")]
|
||||
public SafetyState SafetyState { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ActionScope
|
||||
{
|
||||
INSTANT,
|
||||
NODE,
|
||||
EDGE,
|
||||
}
|
||||
21
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/ActionStatus.cs
Normal file
21
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/ActionStatus.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ActionStatus
|
||||
{
|
||||
WAITING,
|
||||
INITIALIZING,
|
||||
RUNNING,
|
||||
PAUSED,
|
||||
FINISHED,
|
||||
FAILED,
|
||||
}
|
||||
|
||||
public enum ActionEvent
|
||||
{
|
||||
WAITING,
|
||||
INITIALIZING,
|
||||
RUNNING,
|
||||
PAUSED,
|
||||
FINISHED,
|
||||
FAILED,
|
||||
}
|
||||
81
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/ActionType.cs
Normal file
81
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/ActionType.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ActionType
|
||||
{
|
||||
[JsonStringEnumMemberName("startPause")]
|
||||
START_PAUSE,
|
||||
[JsonStringEnumMemberName("stopPause")]
|
||||
STOP_PAUSE,
|
||||
[JsonStringEnumMemberName("startCharging")]
|
||||
START_CHARGING,
|
||||
[JsonStringEnumMemberName("stopCharging")]
|
||||
STOP_CHARGING,
|
||||
[JsonStringEnumMemberName("initPosition")]
|
||||
INIT_POSITION,
|
||||
[JsonStringEnumMemberName("downloadMap")]
|
||||
DOWNLOAD_MAP,
|
||||
[JsonStringEnumMemberName("enableMap")]
|
||||
ENABLE_MAP,
|
||||
[JsonStringEnumMemberName("deleteMap")]
|
||||
DELETE_MAP,
|
||||
[JsonStringEnumMemberName("stateRequest")]
|
||||
STATE_REQUEST,
|
||||
|
||||
[JsonStringEnumMemberName("logReport")]
|
||||
LOG_REPORT,
|
||||
[JsonStringEnumMemberName("pick")]
|
||||
PICK,
|
||||
[JsonStringEnumMemberName("drop")]
|
||||
DROP,
|
||||
[JsonStringEnumMemberName("detectObject")]
|
||||
DETECT_OBJECT,
|
||||
[JsonStringEnumMemberName("finePositioning")]
|
||||
FINE_POSITIONING,
|
||||
[JsonStringEnumMemberName("waitForTrigger")]
|
||||
WAIT_FOR_TRIGGER,
|
||||
[JsonStringEnumMemberName("cancelOrder")]
|
||||
CANCEL_ORDER,
|
||||
[JsonStringEnumMemberName("factsheetRequest")]
|
||||
FACTSHEET_REQUEST,
|
||||
|
||||
[JsonStringEnumMemberName("liftRotate")]
|
||||
LIFT_ROTATE,
|
||||
[JsonStringEnumMemberName("rotate")]
|
||||
ROTATE,
|
||||
[JsonStringEnumMemberName("rotateKeepLift")]
|
||||
ROTATE_KEEP_LIFT,
|
||||
[JsonStringEnumMemberName("mutedBaseOn")]
|
||||
MUTED_BASE_ON,
|
||||
[JsonStringEnumMemberName("mutedBaseOff")]
|
||||
MUTED_BASE_OFF,
|
||||
[JsonStringEnumMemberName("mutedLoadOn")]
|
||||
MUTED_LOAD_ON,
|
||||
[JsonStringEnumMemberName("mutedLoadOff")]
|
||||
MUTED_LOAD_OFF,
|
||||
[JsonStringEnumMemberName("dockTo")]
|
||||
DOCK_TO,
|
||||
[JsonStringEnumMemberName("moveStraightToCoor")]
|
||||
MOVE_STRAIGHT_TO_COOR,
|
||||
[JsonStringEnumMemberName("moveStraightWithDistance")]
|
||||
MOVE_STRAIGHT_WITH_DISTANCE,
|
||||
|
||||
|
||||
[JsonStringEnumMemberName("example")]
|
||||
EXAMPLE,
|
||||
|
||||
[JsonStringEnumMemberName("script")]
|
||||
SCRIPT,
|
||||
|
||||
[JsonStringEnumMemberName("homingCamera")]
|
||||
HOMING_CAMERA,
|
||||
[JsonStringEnumMemberName("liftCameraByHeight")]
|
||||
LIFT_CAMERA_BY_HEIGHT,
|
||||
[JsonStringEnumMemberName("cameraLightOn")]
|
||||
CAMERA_LIGHT_ON,
|
||||
[JsonStringEnumMemberName("cameraLightOff")]
|
||||
CAMERA_LIGHT_OFF,
|
||||
[JsonStringEnumMemberName("controlLight")]
|
||||
CONTROL_LIGHT,
|
||||
}
|
||||
9
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/AgvClass.cs
Normal file
9
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/AgvClass.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum AgvClass
|
||||
{
|
||||
FORKLIFT,
|
||||
CONVEYOR,
|
||||
TUGGER,
|
||||
CARRIER
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum AgvKinematic
|
||||
{
|
||||
DIFF,
|
||||
OMNI,
|
||||
THREEWHEEL
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum BlockingType
|
||||
{
|
||||
NONE,
|
||||
SOFT,
|
||||
HARD
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ConnectionState
|
||||
{
|
||||
ONLINE,
|
||||
OFFLINE,
|
||||
CONNECTIONBROKEN
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum CorridorRefPoint
|
||||
{
|
||||
KINEMATICCENTER,
|
||||
CONTOUR
|
||||
}
|
||||
9
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/EStop.cs
Normal file
9
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/EStop.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum EStop
|
||||
{
|
||||
AUTOACK,
|
||||
MANUAL,
|
||||
REMOTE,
|
||||
NONE,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ErrorLevel
|
||||
{
|
||||
NONE,
|
||||
WARNING,
|
||||
FATAL
|
||||
}
|
||||
|
||||
33
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/ErrorType.cs
Normal file
33
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/ErrorType.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ErrorType
|
||||
{
|
||||
[JsonStringEnumMemberName("validationError")]
|
||||
VALIDATION_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("orderError")]
|
||||
ORDER_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("orderUpdateError")]
|
||||
ORDER_UPDATE_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("peripheralError")]
|
||||
PERIPHERAL_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("initializeOrder")]
|
||||
INITIALIZE_ORDER,
|
||||
|
||||
[JsonStringEnumMemberName("navigationError")]
|
||||
NAVIGATION_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("localizationError")]
|
||||
LOCALIZATION_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("batteryError")]
|
||||
BATTERY_ERROR,
|
||||
|
||||
[JsonStringEnumMemberName("driverError")]
|
||||
DRIVER_ERROR,
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum InfoLevel
|
||||
{
|
||||
INFO,
|
||||
DEBUG
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum InformationType
|
||||
{
|
||||
[JsonStringEnumMemberName("general")]
|
||||
GENERAL,
|
||||
}
|
||||
|
||||
|
||||
public enum InformationReferencesKey
|
||||
{
|
||||
[JsonStringEnumMemberName("state")]
|
||||
STATE,
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum LocalizationType
|
||||
{
|
||||
NATURAL,
|
||||
REFLECTOR,
|
||||
RFID,
|
||||
DMC,
|
||||
SPOT,
|
||||
GRID,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum MapStatus
|
||||
{
|
||||
Enabled,
|
||||
Disabled,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum NavigationType
|
||||
{
|
||||
PHYSICAL_LINDE_GUIDED,
|
||||
VIRTUAL_LINE_GUIDED,
|
||||
AUTONOMOUS,
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum OperatingMode
|
||||
{
|
||||
AUTOMATIC,
|
||||
SEMIAUTOMATIC,
|
||||
MANUAL,
|
||||
SERVICE,
|
||||
TEACHIN,
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
/// <summary>
|
||||
/// Orientation type for vehicle on edge (VDMA LIF: orientationType)
|
||||
/// </summary>
|
||||
public enum OrientationType
|
||||
{
|
||||
/// <summary>
|
||||
/// Global orientation - absolute to map origin
|
||||
/// </summary>
|
||||
GLOBAL = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Tangential orientation - follows edge direction
|
||||
/// </summary>
|
||||
TANGENTIAL = 1
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the requirement level for a parameter or field.
|
||||
/// </summary>
|
||||
/// <remarks>Use this enumeration to indicate whether a value is required, optional, or conditionally required in
|
||||
/// a given context. The meaning of 'conditional' should be defined by the consuming API or documentation.</remarks>
|
||||
public enum RequirementType
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the associated member or parameter is required.
|
||||
/// </summary>
|
||||
/// <remarks>Use this attribute to specify that a value must be provided for the decorated member or
|
||||
/// parameter. This is commonly used for validation purposes in data models or method signatures.</remarks>
|
||||
REQUIRED,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that a method or class is conditionally compiled based on the presence of a specified preprocessing
|
||||
/// symbol.
|
||||
/// </summary>
|
||||
/// <remarks>Apply this attribute to methods or classes to include them in the compiled output only if the
|
||||
/// specified conditional compilation symbol is defined. This is commonly used to include debugging or tracing code
|
||||
/// in builds where certain symbols (such as DEBUG) are present. If the symbol is not defined, calls to the
|
||||
/// attributed method are omitted from the compiled code.</remarks>
|
||||
CONDITIONAL,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the associated parameter is optional.
|
||||
/// </summary>
|
||||
/// <remarks>This attribute can be applied to parameters to specify that they are optional. When used,
|
||||
/// callers may omit the parameter when invoking the method or constructor.</remarks>
|
||||
OPTIONAL
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
/// <summary>
|
||||
/// Rotation direction allowed at nodes (VDMA LIF: rotationAtStartNodeAllowed, rotationAtEndNodeAllowed)
|
||||
/// </summary>
|
||||
public enum RotationDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// No rotation allowed
|
||||
/// </summary>
|
||||
NONE = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Counter-clockwise rotation allowed
|
||||
/// </summary>
|
||||
CCW = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Clockwise rotation allowed
|
||||
/// </summary>
|
||||
CW = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Both clockwise and counter-clockwise rotation allowed
|
||||
/// </summary>
|
||||
BOTH = 3
|
||||
}
|
||||
|
||||
7
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/Support.cs
Normal file
7
srcs/RobotNet10/Shared/RobotNet.VDA5050/Type/Support.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum Support
|
||||
{
|
||||
SUPPORTED,
|
||||
REQUIRED,
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum ValueDataType
|
||||
{
|
||||
BOOL,
|
||||
NUMBER,
|
||||
INTEGER,
|
||||
FLOAT,
|
||||
STRING,
|
||||
OBJECT,
|
||||
ARRAY,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace RobotNet.VDA5050.Type;
|
||||
|
||||
public enum WheelDefinitionsType
|
||||
{
|
||||
DRIVE,
|
||||
CASTER,
|
||||
FIXED,
|
||||
MECANUM,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace RobotNet.VDA5050;
|
||||
|
||||
public record VDA5050Setting
|
||||
{
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public string? TopicPrefix { get; set; }
|
||||
}
|
||||
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/VDA5050Topic.cs
Normal file
26
srcs/RobotNet10/Shared/RobotNet.VDA5050/VDA5050Topic.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using RobotNet.VDA5050.Type;
|
||||
using System.Reflection;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050;
|
||||
|
||||
public enum VDA5050Topic
|
||||
{
|
||||
[JsonStringEnumMemberName("connection")]
|
||||
CONNECTION,
|
||||
|
||||
[JsonStringEnumMemberName("order")]
|
||||
ORDER,
|
||||
|
||||
[JsonStringEnumMemberName("instantActions")]
|
||||
INSTANTACTIONS,
|
||||
|
||||
[JsonStringEnumMemberName("state")]
|
||||
STATE,
|
||||
|
||||
[JsonStringEnumMemberName("visualization")]
|
||||
VISUALIZATION,
|
||||
|
||||
[JsonStringEnumMemberName("factsheet")]
|
||||
FACTSHEET
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Visualization;
|
||||
|
||||
public class AgvPosition
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("y")]
|
||||
public double Y { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("theta")]
|
||||
public double Theta { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("mapId")]
|
||||
public string MapId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("mapDescription")]
|
||||
public string MapDescription { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("positionInitialized")]
|
||||
public bool PositionInitialized { get; set; }
|
||||
|
||||
[JsonPropertyName("localizationScore")]
|
||||
public double LocalizationScore { get; set; }
|
||||
|
||||
[JsonPropertyName("deviationRange")]
|
||||
public double DeviationRange { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Visualization;
|
||||
|
||||
public class Velocity
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("vx")]
|
||||
public double Vx { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("vy")]
|
||||
public double Vy { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("omega")]
|
||||
public double Omega { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RobotNet.VDA5050.Visualization;
|
||||
|
||||
public class VisualizationMsg
|
||||
{
|
||||
[Required]
|
||||
[JsonPropertyName("headerId")]
|
||||
public uint HeaderId { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("timestamp")]
|
||||
[JsonConverter(typeof(DateTimeConverter))]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("manufacturer")]
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[JsonPropertyName("serialNumber")]
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("agvPosition")]
|
||||
public AgvPosition AgvPosition { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("velocity")]
|
||||
public Velocity Velocity { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using RobotNet.VDA5050.Type;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
/// <summary>
|
||||
/// Corridor data transfer object for VDA5050 Order
|
||||
/// Maps to: edge.corridor
|
||||
/// Definition of boundaries in which a vehicle can deviate from its trajectory, e.g. to avoid obstacles.
|
||||
/// </summary>
|
||||
public class CorridorDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the width of the corridor in meters to the left related to the trajectory of the vehicle.
|
||||
/// Minimum: 0.0
|
||||
/// </summary>
|
||||
public double? LeftWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defines the width of the corridor in meters to the right related to the trajectory of the vehicle.
|
||||
/// Minimum: 0.0
|
||||
/// </summary>
|
||||
public double? RightWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defines whether the boundaries are valid for the kinematic center or the contour of the vehicle.
|
||||
/// Optional: KINEMATICCENTER, CONTOUR
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public CorridorRefPoint? CorridorRefPoint { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
/// <summary>
|
||||
/// Edge data transfer object with full details including vehicle properties
|
||||
/// </summary>
|
||||
public class EdgeDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid LevelId { get; set; }
|
||||
public string EdgeId { get; set; } = string.Empty;
|
||||
public string? EdgeName { get; set; }
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
public Guid StartNodeId { get; set; }
|
||||
public Guid EndNodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Start node details (for convenience)
|
||||
/// </summary>
|
||||
public Node.NodeDto? StartNode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End node details (for convenience)
|
||||
/// </summary>
|
||||
public Node.NodeDto? EndNode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle-specific properties for this edge
|
||||
/// </summary>
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using RobotNet.VDA5050.Type;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
/// <summary>
|
||||
/// Edge vehicle property data transfer object
|
||||
/// </summary>
|
||||
public class EdgeVehiclePropertyDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid EdgeId { get; set; }
|
||||
public Guid VehicleTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle type identifier (for reference)
|
||||
/// </summary>
|
||||
public string? VehicleTypeIdString { get; set; }
|
||||
|
||||
public double? VehicleOrientation { get; set; }
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public OrientationType? OrientationType { get; set; }
|
||||
public bool? RotationAllowed { get; set; }
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public RotationDirection? RotationAtStartNodeAllowed { get; set; }
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public RotationDirection? RotationAtEndNodeAllowed { get; set; }
|
||||
public double? MaxSpeed { get; set; }
|
||||
public double? MaxRotationSpeed { get; set; }
|
||||
public double? MinHeight { get; set; }
|
||||
public double? MaxHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Load restriction for this edge (VDMA LIF: loadRestriction)
|
||||
/// </summary>
|
||||
public LoadRestrictionDto? LoadRestriction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Trajectory degree (NURBS curve degree) - Optional
|
||||
/// Values: 1 (linear), 2 (quadratic), 3 (cubic)
|
||||
/// </summary>
|
||||
public int? TrajectoryDegree { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Trajectory control point 1 X coordinate (meters) - Optional
|
||||
/// Used for degree 2 and 3 curves
|
||||
/// </summary>
|
||||
public double? TrajectoryControlPoint1X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Trajectory control point 1 Y coordinate (meters) - Optional
|
||||
/// Used for degree 2 and 3 curves
|
||||
/// </summary>
|
||||
public double? TrajectoryControlPoint1Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Trajectory control point 2 X coordinate (meters) - Optional
|
||||
/// Used for degree 3 curves only
|
||||
/// </summary>
|
||||
public double? TrajectoryControlPoint2X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Trajectory control point 2 Y coordinate (meters) - Optional
|
||||
/// Used for degree 3 curves only
|
||||
/// </summary>
|
||||
public double? TrajectoryControlPoint2Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Actions as JSON array (VDMA LIF format)
|
||||
/// </summary>
|
||||
public string? Actions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Corridor left width (meters) - Optional
|
||||
/// Defines the width of the corridor to the left related to the trajectory
|
||||
/// </summary>
|
||||
public double? CorridorLeftWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Corridor right width (meters) - Optional
|
||||
/// Defines the width of the corridor to the right related to the trajectory
|
||||
/// </summary>
|
||||
public double? CorridorRightWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Corridor reference point (VDA5050: corridorRefPoint) - Optional
|
||||
/// Defines whether the boundaries are valid for the kinematic center or the contour of the vehicle
|
||||
/// Values: KINEMATICCENTER, CONTOUR
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public CorridorRefPoint? CorridorRefPoint { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
/// <summary>
|
||||
/// Load restriction data transfer object for VDMA LIF
|
||||
/// Maps to: edge.vehicleTypeEdgeProperties[].loadRestriction
|
||||
/// </summary>
|
||||
public class LoadRestrictionDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates if the edge can be traversed without a load
|
||||
/// </summary>
|
||||
public bool? Unloaded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the edge can be traversed with a load
|
||||
/// </summary>
|
||||
public bool? Loaded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Names of the load sets allowed on this edge (optional)
|
||||
/// </summary>
|
||||
public List<string>? LoadSetNames { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Layout;
|
||||
|
||||
/// <summary>
|
||||
/// Layout data transfer object
|
||||
/// </summary>
|
||||
public class LayoutDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string LayoutId { get; set; } = string.Empty;
|
||||
public string LayoutName { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
public string? ModifiedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of versions (optional, for detailed queries)
|
||||
/// </summary>
|
||||
public List<LayoutVersionDto>? Versions { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using RobotNet10.MapEditor.Shared.Models;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Layout;
|
||||
|
||||
/// <summary>
|
||||
/// Layout level data transfer object
|
||||
/// </summary>
|
||||
public class LayoutLevelDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid VersionId { get; set; }
|
||||
public string LayoutLevelId { get; set; } = string.Empty;
|
||||
public int LevelOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Editor settings including coordinate system
|
||||
/// </summary>
|
||||
public LayoutLevelEditorSettingsDto? EditorSettings { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Layout;
|
||||
|
||||
/// <summary>
|
||||
/// Layout level editor settings data transfer object
|
||||
/// </summary>
|
||||
public class LayoutLevelEditorSettingsDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid LevelId { get; set; }
|
||||
|
||||
// Edge Settings
|
||||
public double EdgeMinLengthCreate { get; set; }
|
||||
public bool EdgeNameAutoGenerate { get; set; }
|
||||
|
||||
// Node Settings
|
||||
public bool NodeNameAutoGenerate { get; set; }
|
||||
public double NodeProximityRadius { get; set; }
|
||||
|
||||
// Coordinate System
|
||||
public double OriginX { get; set; }
|
||||
public double OriginY { get; set; }
|
||||
public double Resolution { get; set; }
|
||||
|
||||
// Coordinate Bounds
|
||||
public double? BoundsMinX { get; set; }
|
||||
public double? BoundsMaxX { get; set; }
|
||||
public double? BoundsMinY { get; set; }
|
||||
public double? BoundsMaxY { get; set; }
|
||||
|
||||
// Background Image
|
||||
public double? ImageWidth { get; set; }
|
||||
public double? ImageHeight { get; set; }
|
||||
|
||||
// Metadata
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Layout;
|
||||
|
||||
/// <summary>
|
||||
/// Layout version data transfer object
|
||||
/// </summary>
|
||||
public class LayoutVersionDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid LayoutId { get; set; }
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public string? LayoutDescription { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of levels (optional, for detailed queries)
|
||||
/// </summary>
|
||||
public List<LayoutLevelDto>? Levels { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Station;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.LayoutData;
|
||||
|
||||
/// <summary>
|
||||
/// Complete layout data for a single layout level
|
||||
/// Includes nodes, edges, and stations with all nested properties
|
||||
/// </summary>
|
||||
public class LayoutDataDto
|
||||
{
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
public List<NodeDto> Nodes { get; set; } = new();
|
||||
public List<EdgeDto> Edges { get; set; } = new();
|
||||
public List<StationDto> Stations { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
|
||||
/// <summary>
|
||||
/// Node data transfer object with full details including vehicle properties
|
||||
/// </summary>
|
||||
public class NodeDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid LevelId { get; set; }
|
||||
public string NodeId { get; set; } = string.Empty;
|
||||
public string? NodeName { get; set; }
|
||||
public string? NodeDescription { get; set; }
|
||||
public string? MapId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle-specific properties for this node
|
||||
/// </summary>
|
||||
public List<NodeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
|
||||
/// <summary>
|
||||
/// Node vehicle property data transfer object
|
||||
/// </summary>
|
||||
public class NodeVehiclePropertyDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid NodeId { get; set; }
|
||||
public Guid VehicleTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle type identifier (for reference)
|
||||
/// </summary>
|
||||
public string? VehicleTypeIdString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Theta orientation in radians (optional)
|
||||
/// Range: [-Pi ... Pi]
|
||||
/// </summary>
|
||||
public double? Theta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Actions as JSON array (VDMA LIF format)
|
||||
/// </summary>
|
||||
public string? Actions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Allowed deviation radius in meters (VDA5050: allowedDeviationXY)
|
||||
/// Indicates how exact an AGV has to drive over a node in order for it to count as traversed.
|
||||
/// If = 0: no deviation is allowed.
|
||||
/// If > 0: allowed deviation-radius in meters.
|
||||
/// Minimum: 0
|
||||
/// </summary>
|
||||
public double? AllowedDeviationXY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Allowed deviation of theta angle in radians (VDA5050: allowedDeviationTheta)
|
||||
/// Indicates how big the deviation of theta angle can be.
|
||||
/// Range: [0.0 ... 3.141592654] (0 to Pi)
|
||||
/// </summary>
|
||||
public double? AllowedDeviationTheta { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to copy selected nodes and edges with an offset
|
||||
/// </summary>
|
||||
public class CopyNodesRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Layout level ID
|
||||
/// </summary>
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of node IDs to copy
|
||||
/// </summary>
|
||||
public List<Guid> NodeIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// List of edge IDs to copy (only edges where both nodes are in NodeIds will be copied)
|
||||
/// </summary>
|
||||
public List<Guid> EdgeIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Offset X in world coordinates (meters)
|
||||
/// </summary>
|
||||
public double OffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset Y in world coordinates (meters)
|
||||
/// </summary>
|
||||
public double OffsetY { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new edge
|
||||
/// Coordinates in METERS (world coordinates)
|
||||
/// </summary>
|
||||
public class CreateEdgeRequest
|
||||
{
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Start point X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Start point Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End point X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End point Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional edge name (if not provided, auto-generated)
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.StringLength(256, ErrorMessage = "EdgeName must not exceed 256 characters")]
|
||||
public string? EdgeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional edge description
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.StringLength(10000, ErrorMessage = "EdgeDescription must not exceed 10000 characters")]
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional vehicle properties for this edge
|
||||
/// </summary>
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using RobotNet10.MapEditor.Shared.Models;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new layout level
|
||||
/// </summary>
|
||||
public class CreateLayoutLevelRequest
|
||||
{
|
||||
[Required(ErrorMessage = "LayoutLevelId is required")]
|
||||
[StringLength(64, ErrorMessage = "LayoutLevelId must not exceed 64 characters")]
|
||||
public string LayoutLevelId { get; set; } = string.Empty;
|
||||
public int LevelOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional coordinate system configuration
|
||||
/// If not provided, defaults will be used
|
||||
/// </summary>
|
||||
public CoordinateSystemInfo? CoordinateSystem { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new layout
|
||||
/// </summary>
|
||||
public class CreateLayoutRequest
|
||||
{
|
||||
[Required(ErrorMessage = "LayoutId is required")]
|
||||
[StringLength(64, ErrorMessage = "LayoutId must not exceed 64 characters")]
|
||||
public string LayoutId { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "LayoutName is required")]
|
||||
[StringLength(256, ErrorMessage = "LayoutName must not exceed 256 characters")]
|
||||
public string LayoutName { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(10000, ErrorMessage = "Description must not exceed 10000 characters")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? CreatedBy { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new layout version
|
||||
/// </summary>
|
||||
public class CreateLayoutVersionRequest
|
||||
{
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public string? LayoutDescription { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new station
|
||||
/// </summary>
|
||||
public class CreateStationRequest
|
||||
{
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "StationId is required")]
|
||||
[StringLength(64, ErrorMessage = "StationId must not exceed 64 characters")]
|
||||
public string StationId { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(256, ErrorMessage = "StationName must not exceed 256 characters")]
|
||||
public string? StationName { get; set; }
|
||||
|
||||
[StringLength(10000, ErrorMessage = "StationDescription must not exceed 10000 characters")]
|
||||
public string? StationDescription { get; set; }
|
||||
public double? StationHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// X coordinate in METERS
|
||||
/// </summary>
|
||||
public double X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Y coordinate in METERS
|
||||
/// </summary>
|
||||
public double Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Theta orientation in radians (optional)
|
||||
/// </summary>
|
||||
public double? Theta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Node IDs to link as interaction nodes
|
||||
/// </summary>
|
||||
public List<Guid>? InteractionNodeIds { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new vehicle type
|
||||
/// </summary>
|
||||
public class CreateVehicleTypeRequest
|
||||
{
|
||||
[Required(ErrorMessage = "VehicleTypeId is required")]
|
||||
[StringLength(64, ErrorMessage = "VehicleTypeId must not exceed 64 characters")]
|
||||
[RegularExpression(@"^[a-zA-Z0-9\-_]+$",
|
||||
ErrorMessage = "VehicleTypeId must contain only alphanumeric characters, hyphens, and underscores")]
|
||||
public string VehicleTypeId { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "VehicleTypeName is required")]
|
||||
[StringLength(256, ErrorMessage = "VehicleTypeName must not exceed 256 characters")]
|
||||
public string VehicleTypeName { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(10000, ErrorMessage = "Description must not exceed 10000 characters")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[MaxLength(50000, ErrorMessage = "Specifications must not exceed 50000 characters")]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Actions default that vehicle can perform (VDMA LIF: actions)
|
||||
/// JSON array format:
|
||||
/// [
|
||||
/// {
|
||||
/// "actionType": "pick",
|
||||
/// "actionDescription": "...",
|
||||
/// "requirementType": "REQUIRED", // Enum: REQUIRED, CONDITIONAL, OPTIONAL
|
||||
/// "blockingType": "HARD",
|
||||
/// "actionParameters": [{"key": "...", "value": "..."}]
|
||||
/// }
|
||||
/// ]
|
||||
/// </summary>
|
||||
[MaxLength(50000, ErrorMessage = "Actions must not exceed 50000 characters")]
|
||||
public string? Actions { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to delete multiple edges in a transaction
|
||||
/// </summary>
|
||||
public class DeleteEdgesRequest
|
||||
{
|
||||
public List<Guid> EdgeIds { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to merge multiple nodes into one
|
||||
/// </summary>
|
||||
public class MergeNodesRequest
|
||||
{
|
||||
public Guid LevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of node IDs to merge
|
||||
/// </summary>
|
||||
public List<Guid> NodeIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Specify center position for merged node
|
||||
/// If not provided, will calculate center from nodes
|
||||
/// </summary>
|
||||
public double? CenterX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Specify center position for merged node
|
||||
/// If not provided, will calculate center from nodes
|
||||
/// </summary>
|
||||
public double? CenterY { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to save all layout changes (nodes and edges) in a batch operation
|
||||
/// </summary>
|
||||
public class SaveLayoutDataRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Layout level ID
|
||||
/// </summary>
|
||||
public Guid LayoutLevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Nodes to update (only modified nodes should be included)
|
||||
/// </summary>
|
||||
public List<NodeUpdateItem> Nodes { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Edges to update (only modified edges should be included)
|
||||
/// </summary>
|
||||
public List<EdgeUpdateItem> Edges { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Node update item for batch save
|
||||
/// </summary>
|
||||
public class NodeUpdateItem
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public double? X { get; set; }
|
||||
public double? Y { get; set; }
|
||||
public string? NodeName { get; set; }
|
||||
public string? NodeDescription { get; set; }
|
||||
public string? MapId { get; set; }
|
||||
public List<NodeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edge update item for batch save
|
||||
/// </summary>
|
||||
public class EdgeUpdateItem
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? EdgeName { get; set; }
|
||||
public string? EdgeDescription { get; set; }
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to split a node into multiple nodes
|
||||
/// </summary>
|
||||
public class SplitNodeRequest
|
||||
{
|
||||
public Guid LevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Node ID to split
|
||||
/// </summary>
|
||||
public Guid NodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Offset distance for new nodes (in meters)
|
||||
/// Default: 0.1m (10cm)
|
||||
/// </summary>
|
||||
public double? OffsetDistance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional: Node ID to assign station to (if original node had station)
|
||||
/// If not provided, station will be assigned to first new node
|
||||
/// </summary>
|
||||
public Guid? StationNodeId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Edge;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing edge
|
||||
/// </summary>
|
||||
public class UpdateEdgeRequest
|
||||
{
|
||||
public string? EdgeName { get; set; }
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated vehicle properties (replaces existing)
|
||||
/// </summary>
|
||||
public List<EdgeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using RobotNet10.MapEditor.Shared.Models;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update a layout level
|
||||
/// </summary>
|
||||
public class UpdateLayoutLevelRequest
|
||||
{
|
||||
public string? LayoutLevelId { get; set; }
|
||||
public int? LevelOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional coordinate system configuration update
|
||||
/// </summary>
|
||||
public CoordinateSystemInfo? CoordinateSystem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional editor settings configuration update
|
||||
/// </summary>
|
||||
public EditorSettingsInfo? EditorSettings { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing layout
|
||||
/// </summary>
|
||||
public class UpdateLayoutRequest
|
||||
{
|
||||
public string LayoutName { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public string? ModifiedBy { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using RobotNet10.MapEditor.Shared.DTOs.Node;
|
||||
|
||||
namespace RobotNet10.MapEditor.Shared.DTOs.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing node
|
||||
/// </summary>
|
||||
public class UpdateNodeRequest
|
||||
{
|
||||
public double? X { get; set; }
|
||||
public double? Y { get; set; }
|
||||
public string? NodeName { get; set; }
|
||||
public string? NodeDescription { get; set; }
|
||||
public string? MapId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated vehicle properties (replaces existing)
|
||||
/// </summary>
|
||||
public List<NodeVehiclePropertyDto>? VehicleProperties { get; set; }
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user