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.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models { /// <summary>
/// 資料暫存類別
/// </summary>
public class TemporaryDataDto { /// <summary>
/// 建構式
/// </summary>
public TemporaryDataDto() { DataBuffers = new List<DataBuffer>(); } /// <summary>
/// 資料暫存
/// </summary>
[Required, JsonPropertyName("data_buffer")] public List<DataBuffer> DataBuffers { get; set; } } /// <summary>
/// 資料暫存類別
/// </summary>
public class DataBuffer { /// <summary>
/// 設備編號
/// </summary>
[JsonPropertyName("EPQT_ID")] public string EquipmentID { get; set; } /// <summary>
/// 暫存器區塊名稱
/// </summary>
[JsonPropertyName("DATA_MAP_KEY")] public string DataMapKey { get; set; } /// <summary>
/// 資料
/// </summary>
[JsonPropertyName("DATA")] public string Data { get; set; } } /// <summary>
/// 設備暫存類別
/// </summary>
public class TemporaryEquipmentDto { /// <summary>
/// 建構式
/// </summary>
public TemporaryEquipmentDto() { EquipmentBuffers = new List<EquipmentBuffer>(); } /// <summary>
/// 設備暫存資料清單
/// </summary>
[Required, JsonPropertyName("equipment_buffer")] public List<EquipmentBuffer> EquipmentBuffers { get; set; } } /// <summary>
/// 設備暫存類別
/// </summary>
public class EquipmentBuffer { /// <summary>
/// 設備/系統編號
/// </summary>
[JsonPropertyName("DEVICE_ID")] public string DeviceID { get; set; } /// <summary>
/// 第1暫存器資料
/// </summary>
[JsonPropertyName("D01")] public int D01 { get; set; } /// <summary>
/// 第2暫存器資料
/// </summary>
[JsonPropertyName("D02")] public int D02 { get; set; } /// <summary>
/// 第3暫存器資料
/// </summary>
[JsonPropertyName("D03")] public int D03 { get; set; } /// <summary>
/// 第4暫存器資料
/// </summary>
[JsonPropertyName("D04")] public int D04 { get; set; } /// <summary>
/// 第5暫存器資料
/// </summary>
[JsonPropertyName("D05")] public int D05 { get; set; } /// <summary>
/// 第6暫存器資料
/// </summary>
[JsonPropertyName("D06")] public int D06 { get; set; } /// <summary>
/// 第7暫存器資料
/// </summary>
[JsonPropertyName("D07")] public int D07 { get; set; } /// <summary>
/// 第8暫存器資料
/// </summary>
[JsonPropertyName("D08")] public int D08 { get; set; } /// <summary>
/// 第9暫存器資料
/// </summary>
[JsonPropertyName("D09")] public int D09 { get; set; } /// <summary>
/// 第10暫存器資料
/// </summary>
[JsonPropertyName("D10")] public int D10 { get; set; } } }
|