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

8 months ago
  1. using System.ComponentModel.DataAnnotations;
  2. using System.Text.Json.Serialization;
  3. namespace Mirle.Component.API.AutomatedGuideVehicleController.Models
  4. {
  5. /// <summary>
  6. /// 通用訊息類別
  7. /// </summary>
  8. public class CommonMessage
  9. {
  10. /// <summary>
  11. /// 本通訊協議版本
  12. /// </summary>
  13. [Required, StringLength(10), JsonPropertyName("protocol_version"), JsonPropertyOrder(1)]
  14. public string ProtocolVersion { get; set; }
  15. /// <summary>
  16. /// 指令序號
  17. /// </summary>
  18. [Required, StringLength(6), JsonPropertyName("sequence"), JsonPropertyOrder(2)]
  19. public string Sequence { get; set; }
  20. /// <summary>
  21. /// 時間戳記
  22. /// </summary>
  23. /// <remarks>yyyy-MM-dd HH:mm:ss.fff</remarks>
  24. [Required, StringLength(25), JsonPropertyName("timestamp"), JsonPropertyOrder(3)]
  25. public string Timestamp { get; set; }
  26. /// <summary>
  27. /// 命令優先權重
  28. /// </summary>
  29. /// <value>1 - 255</value>
  30. [Required, StringLength(3), JsonPropertyName("priority"), JsonPropertyOrder(4)]
  31. public string Priority { get; set; }
  32. }
  33. }