32 lines
649 B
C#
32 lines
649 B
C#
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);
|
|
}
|
|
} |