Initial commit
This commit is contained in:
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();
|
||||
}
|
||||
Reference in New Issue
Block a user