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.
 
 
 
 
 

60 lines
2.0 KiB

using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models
{
/// <summary>
/// 消防警訊通知回報類別
/// </summary>
public class FP049FireAlarmNotifyReportDto : CommonMessage
{
/// <summary>
/// 取得消防警訊通知回報
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <returns>消防警訊通知回報</returns>
public static FP049FireAlarmNotifyReportDto Get(TransactionName transName, string softwareID)
{
return new FP049FireAlarmNotifyReportDto()
{
Timetick = DateTime.Now,
TransactionName = transName.ToTransactionName(),
SoftwareID = softwareID
};
}
}
/// <summary>
/// 消防警訊通知回應類別
/// </summary>
public class TP050FireAlarmNotifyAckDto : CommonMessage
{
/// <summary>
/// 結果代碼
/// </summary>
/// <value>
/// 0 = OK <br/>
/// 1 = NG <br/>
/// </value>
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(101)]
public ReplyCode ReplyCode { get; set; }
/// <summary>
/// 取得消防警訊通知回應
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="replyCode">回應代碼</param>
/// <returns>消防警訊通知回應</returns>
public static TP050FireAlarmNotifyAckDto Get(TransactionName transName, string softwareID, ReplyCode replyCode)
{
return new TP050FireAlarmNotifyAckDto()
{
Timetick = DateTime.Now,
TransactionName = transName.ToTransactionName(),
SoftwareID = softwareID,
ReplyCode = replyCode
};
}
}
}