Initial commit
This commit is contained in:
@@ -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; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user