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.
|
|
using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models { /// <summary>
/// 取消命令請求類別
/// </summary>
public class TP007CancelCommandRequestDto : CommonMessage { /// <summary>
/// 取消模式
/// </summary>
/// <value>
/// 0 = Cancel <br/>
/// 1 = Force Cancel <br/>
/// 2 = Force Complete <br/>
/// </value>
[Required, JsonPropertyName("cancel_mode"), JsonPropertyOrder(5)] public TaskCancelMode CancelMode { get; set; } /// <summary>
/// 取得取消命令請求
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="taskID">任務編號</param>
/// <param name="cancelMode">取消模式</param>
/// <returns>取消命令請求</returns>
public static TP007CancelCommandRequestDto Get(TransactionName transName, string softwareID, string taskID, TaskCancelMode cancelMode) { return new TP007CancelCommandRequestDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, TaskID = taskID, CancelMode = cancelMode }; } } /// <summary>
/// 取消命令回應類別
/// </summary>
public class FP008CancelCommandResponseDto : CommonMessage { /// <summary>
/// 取消類別
/// </summary>
/// <value>
/// 0 = Cancel <br/>
/// 1 = Force Cancel <br/>
/// 2 = Force Complete <br/>
/// </value>
[Required, JsonPropertyName("cancel_mode"), JsonPropertyOrder(101)] public TaskCancelMode CancelMode { get; set; } /// <summary>
/// 結果代碼
/// </summary>
/// <value>
/// 0 = Success <br/>
/// 1 = Reject <br/>
/// </value>
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(102)] public CancelCommandResultCode ResultCode { get; set; } } }
|