You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
34 lines
1.2 KiB
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Mirle.Component.API.AutomatedGuideVehicleController.Models
|
|
{
|
|
/// <summary>
|
|
/// 通用訊息類別
|
|
/// </summary>
|
|
public class CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 本通訊協議版本
|
|
/// </summary>
|
|
[Required, StringLength(10), JsonPropertyName("protocol_version"), JsonPropertyOrder(1)]
|
|
public string ProtocolVersion { get; set; }
|
|
/// <summary>
|
|
/// 指令序號
|
|
/// </summary>
|
|
[Required, StringLength(6), JsonPropertyName("sequence"), JsonPropertyOrder(2)]
|
|
public string Sequence { get; set; }
|
|
/// <summary>
|
|
/// 時間戳記
|
|
/// </summary>
|
|
/// <remarks>yyyy-MM-dd HH:mm:ss.fff</remarks>
|
|
[Required, StringLength(25), JsonPropertyName("timestamp"), JsonPropertyOrder(3)]
|
|
public string Timestamp { get; set; }
|
|
/// <summary>
|
|
/// 命令優先權重
|
|
/// </summary>
|
|
/// <value>1 - 255</value>
|
|
[Required, StringLength(3), JsonPropertyName("priority"), JsonPropertyOrder(4)]
|
|
public string Priority { get; set; }
|
|
}
|
|
}
|