using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 緊急停止回應類別 /// public class FP053EmergencyOffReportDto : CommonMessage { /// /// 站點編號 /// [Required, JsonPropertyName("station_id"), JsonPropertyOrder(101)] public List StationID { get; set; } } /// /// 緊急停止回應類別 /// public class TP054EmergencyOffAckDto : CommonMessage { /// /// 站點編號 /// [Required, JsonPropertyName("station_id"), JsonPropertyOrder(101)] public List StationID { get; set; } /// /// 結果代碼 /// /// /// 0 = OK
/// 1 = NG
///
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(102)] public ReplyCode ReplyCode { get; set; } /// /// 取得緊急停止回應 /// /// 交易名稱 /// 軟體編號 /// 站點編號 /// 回應代碼 /// 緊急停止回應 public static TP054EmergencyOffAckDto Get(TransactionName transName, string softwareID, List staionID, ReplyCode replyCode) { return new TP054EmergencyOffAckDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, StationID = staionID, ReplyCode = replyCode }; } } }