hisence-yolo-detection/HisenceYoloDetection/PLCItem.cs
2024-05-31 10:14:57 +08:00

54 lines
1.1 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel;
public enum PLCOpType
{
[Description("读取")]
Read = 1,
[Description("写入")]
Write = 2,
[Description("监控")]
Monitor = 4,
/// <summary>
/// 报警监控 1+8
/// </summary>
[Description("报警监控")]
WarningMonitor = 9,
/// <summary>
/// CT监控 1+16
/// </summary>
[Description("CT监控")]
CTMonitor = 17,
}
public class PLCItem
{
/// <summary>
/// 读写地址
/// </summary>
public string Address { get; set; } = "";
/// <summary>
/// 读写地址长度
/// </summary>
public int ItemLength { get; set; } = 1;
/// <summary>
/// PLC项目值
/// </summary>
public List<int> ItemValues { get; set; } = new List<int>();
/// <summary>
/// 是否写数据 1读数据 2写数据 4:监控 参见枚举PLCOpType
/// </summary>
public PLCOpType PLCOpType { get; set; } = PLCOpType.Read;
public DateTime OpTimeStamp { get; set; } = DateTime.Now;
}