wcs_serve_wuxikate/Tools/PlcTool/Siemens/Entity/SemS7Result.cs

32 lines
618 B
C#
Raw Normal View History

2025-01-03 14:36:27 +08:00
using Newtonsoft.Json;
using System.Text;
namespace PlcTool.Siemens.Entity;
public class SemS7Result
{
public bool Success { get; set; } = false;
public int? ErrCode { get; set; }
public string? Message { get; set; }
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
}
/// <summary>
/// PLC操作的返回泛型类
/// </summary>
/// <typeparam name="T"></typeparam>
public class SemS7Result<T> : SemS7Result
{
public T? Value { get; set; }
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
}