43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using OpenTK.Platform.Windows;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using static AgroBase.Models.Enums;
|
|
|
|
namespace AgroBase.Models
|
|
{
|
|
public class ModbusModel
|
|
{
|
|
|
|
}
|
|
|
|
public class ModbusParametrosModel
|
|
{
|
|
public DateTime UltimaRequisicao { get; set; } = DateTime.MaxValue;
|
|
public string Descricao { get; set; }
|
|
public string Chave { get; set; }
|
|
public byte Registro { get; set; }
|
|
public byte N_Registros { get; set; }
|
|
public bool LeituraLoop { get; set; }
|
|
public bool LeituraGeral { get; set; }
|
|
public double Escala { get; set; }
|
|
public byte[] Valor { get; set; }
|
|
}
|
|
|
|
public class ModbusComandoModel
|
|
{
|
|
public DateTime Momento { get; set; } = DateTime.Now;
|
|
public T_Code Dispositivo { get; set; }
|
|
public byte Endereco { get; set; }
|
|
public byte[] Comando { get; set; }
|
|
public bool Enviado { get; set; } = false;
|
|
public int TamanhoEsperado { get; set; } = 3;
|
|
public int TimeoutResposta { get; set; } = 500;
|
|
public byte[] Resposta { get; set; }
|
|
public DateTime RespondidoEm { get; set; } = DateTime.MinValue;
|
|
public bool Verificacao { get; set; }
|
|
}
|
|
}
|