650 lines
27 KiB
C#
650 lines
27 KiB
C#
using AgroBase.Forms;
|
|
using AgroBase.Services;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using static AgroBase.Models.Enuns;
|
|
|
|
namespace AgroBase.Models.Modules
|
|
{
|
|
class SensoriamentoModel : DispositivoBaseModel
|
|
{
|
|
public static int _TaxaAmostragem { get; set; } = 500;
|
|
public bool Conectado { get; set; } = false;
|
|
public static int LogsManter { get; set; } = 60;
|
|
public static List<PinoutModel> Pinout { get; set; }
|
|
public static List<FuncoesPinout> Funcoes { get; set; } = new List<FuncoesPinout>();
|
|
public List<SensorModel> Sensores { get; set; }
|
|
|
|
|
|
public static SensoriamentoModel CarregarParametrosIniciais()
|
|
{
|
|
return new SensoriamentoModel()
|
|
{
|
|
Sensores = new List<SensorModel>()
|
|
{
|
|
new SensorModel()
|
|
{
|
|
ID = "TMVET",
|
|
Descricao = "Temperatura Motor Esquerdo Trás",
|
|
Prioridade = 0,
|
|
Componente = S_Code.sTMP,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.TMP,
|
|
},
|
|
DelayAmostragem = 200,
|
|
UnidadeMedida = "ºC",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "V offset", "-1.038" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "TMVEF",
|
|
Descricao = "Temperatura Motor Esquerdo Frente",
|
|
Prioridade = 0,
|
|
Componente = S_Code.sTMP,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.TMP,
|
|
},
|
|
DelayAmostragem = 200,
|
|
UnidadeMedida = "ºC",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "V offset", "-1.038" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "TMVDT",
|
|
Descricao = "Temperatura Motor Direito Trás",
|
|
Prioridade = 0,
|
|
Componente = S_Code.sTMP,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.TMP,
|
|
},
|
|
DelayAmostragem = 200,
|
|
UnidadeMedida = "ºC",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "V offset", "-1.038" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "TMVDF",
|
|
Descricao = "Temperatura Motor Direito Frente",
|
|
Prioridade = 0,
|
|
Componente = S_Code.sTMP,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.TMP,
|
|
},
|
|
DelayAmostragem = 200,
|
|
UnidadeMedida = "ºC",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "V offset", "-1.038" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "VBAT",
|
|
Descricao = "Tensão da bateria",
|
|
Prioridade = 20,
|
|
Componente = S_Code.sTEN,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.Tensao,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "V",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "V offset", "000.85" },
|
|
new string[] { "R1", "120000" },
|
|
new string[] { "R2", "010000" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "AMVET",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente do Motor BLDC ET",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x40" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "AMVEF",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente do Motor BLDC EF",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x41" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "AMVDT",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente do Motor BLDC DT",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x42" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "AMVDF",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente do Motor BLDC DF",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x43" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "AMP",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente dos Motores de Passo",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x44" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "AAT",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente do Módulo Atuador",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x45" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "APC",
|
|
Prioridade = 10,
|
|
Descricao = "Corrente do Computador",
|
|
Componente = S_Code.sCOR,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.I2C,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "A",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "Endereço I2C", "0x46" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "TBAT",
|
|
Descricao = "Temperatura da bateria",
|
|
Prioridade = 5,
|
|
Componente = S_Code.sTMP,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.TMP,
|
|
},
|
|
DelayAmostragem = 500,
|
|
UnidadeMedida = "ºC",
|
|
Parametros = new List<string[]>()
|
|
{
|
|
new string[] { "V offset", "0.0000" },
|
|
},
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "SUESQ",
|
|
Descricao = "Sensor Ultrassom Esquerdo",
|
|
Prioridade = 2,
|
|
Componente = S_Code.sULT,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.Echo,
|
|
FuncoesPinout.Trigger,
|
|
},
|
|
DelayAmostragem = 1000,
|
|
UnidadeMedida = "cm",
|
|
Parametros = new List<string[]>(),
|
|
},
|
|
new SensorModel()
|
|
{
|
|
ID = "SUDIR",
|
|
Descricao = "Sensor Ultrassom Direito",
|
|
Prioridade = 2,
|
|
Componente = S_Code.sULT,
|
|
Aferir = true,
|
|
Inicializado = false,
|
|
Testando = false,
|
|
Funcoes = new List<FuncoesPinout>()
|
|
{
|
|
FuncoesPinout.Echo,
|
|
FuncoesPinout.Trigger,
|
|
},
|
|
DelayAmostragem = 1000,
|
|
UnidadeMedida = "cm",
|
|
Parametros = new List<string[]>(),
|
|
},
|
|
}
|
|
};
|
|
}
|
|
|
|
public List<string> ProtocoloConfiguracao(bool Conectar)
|
|
{
|
|
List<string> Config = Sensores.Select(x => x.ProtocoloConfiguracaoSensor(Pinout, Conectar)).ToList();
|
|
string ProtocoloMOD = ((int)F_Code.Cfg).ToString() +
|
|
"MD".PadRight(5, ' ') + ";" + // 0 ~ 4
|
|
(Conectar ? "1" : "0") + ";" + // 6
|
|
_TaxaAmostragem.ToString("00000"); // 8 ~ 12
|
|
Config.Add(ProtocoloMOD);
|
|
return Config;
|
|
}
|
|
|
|
public void RecebeProtocoloSerial(string Protocolo)
|
|
{
|
|
// #ET;00000;00000;00000;000
|
|
if (!string.IsNullOrEmpty(Protocolo) && Protocolo[0].ToString() == SerialService.BeginSensor)
|
|
{
|
|
string[] Dados = Protocolo.Replace(SerialService.BeginSensor, "").Split(SerialService.EndLine[0])[0].Split(';');
|
|
int cod = 0;
|
|
int.TryParse(Dados[0], out cod);
|
|
if (cod == 0)
|
|
{
|
|
return;
|
|
}
|
|
|
|
S_Code TipoSensor = (S_Code)(cod);
|
|
SensorModel Sensor = Sensores.FirstOrDefault(x => x.ID == Dados[1].Trim());
|
|
if (Sensor == null)
|
|
{
|
|
if (Dados[1] == "MD")
|
|
{
|
|
Conectado = Dados[2] == "1";
|
|
}
|
|
return;
|
|
}
|
|
try
|
|
{
|
|
bool AtualizaGrafico = false;
|
|
|
|
switch (TipoSensor)
|
|
{
|
|
case S_Code.sCFG:
|
|
Sensor.Inicializado = Dados[2] == "1";
|
|
break;
|
|
case S_Code.sCOR:
|
|
double vBarramento = -1;
|
|
double.TryParse(Dados[2].Replace(".", ","), out vBarramento);
|
|
double vShunt = -1;
|
|
double.TryParse(Dados[3].Replace(".", ","), out vShunt);
|
|
double corrente = -1;
|
|
double.TryParse(Dados[4].Replace(".", ","), out corrente);
|
|
double potencia = -1;
|
|
double.TryParse(Dados[5].Replace(".", ","), out potencia);
|
|
|
|
Sensor.Leituras = new List<double>()
|
|
{
|
|
corrente,
|
|
vBarramento,
|
|
potencia,
|
|
vShunt,
|
|
};
|
|
|
|
if (Sensor.Descricao.ToLower().Contains("bateria"))
|
|
{
|
|
frmInstancial.frmAcompanhamento.AtualizarSensores("Corrente atual: " + corrente.ToString("0.00") + "A - Mín: " + Sensor.ValorMinimo.ToString("0.00") + "A - Máx: " + Sensor.ValorMaximo.ToString("0.00") + "A");
|
|
}
|
|
|
|
AtualizaGrafico = true;
|
|
break;
|
|
case S_Code.sTEN:
|
|
double leituraV = -1;
|
|
double.TryParse(Dados[2].Replace(".", ","), out leituraV);
|
|
double vPinV = -1;
|
|
double.TryParse(Dados[3].Replace(".", ","), out vPinV);
|
|
double tensao = -1;
|
|
double.TryParse(Dados[4].Replace(".", ","), out tensao);
|
|
|
|
Sensor.Leituras = new List<double>()
|
|
{
|
|
tensao,
|
|
leituraV,
|
|
vPinV,
|
|
};
|
|
|
|
if (Sensor.Descricao.ToLower().Contains("bateria"))
|
|
{
|
|
frmInstancial.frmAcompanhamento.AtualizarSensores("Tensão atual: " + tensao.ToString("0.00") + "V - Mín: " + Sensor.ValorMinimo.ToString("0.00") + "V - Máx: " + Sensor.ValorMaximo.ToString("0.00") + "V");
|
|
Variaveis.OperacaoEmAndamento.Sensoriamento.PorcentagemBateria = (tensao / Sensor.LimiteMaximo) * 100;
|
|
}
|
|
|
|
AtualizaGrafico = true;
|
|
|
|
break;
|
|
case S_Code.sTMP:
|
|
double temp = -1;
|
|
double.TryParse(Dados[2].Replace(".", ","), out temp);
|
|
Sensor.Leituras = new List<double>() { temp };
|
|
|
|
if (Sensor.Descricao.ToLower().Contains("bateria"))
|
|
{
|
|
frmInstancial.frmAcompanhamento.AtualizarSensores("Temp atual: " + temp.ToString("0.00") + "ºC - Mín: " + Sensor.ValorMinimo.ToString("0.00") + "ºC - Máx: " + Sensor.ValorMaximo.ToString("0.00") + "ºC");
|
|
}
|
|
|
|
AtualizaGrafico = true;
|
|
break;
|
|
case S_Code.sULT:
|
|
double distancia = -1;
|
|
double.TryParse(Dados[2].Replace(".", ","), out distancia);
|
|
int duracao = -1;
|
|
int.TryParse(Dados[3], out duracao);
|
|
|
|
Sensor.Leituras = new List<double>()
|
|
{
|
|
distancia,
|
|
duracao,
|
|
};
|
|
|
|
if (Sensor.ID == "SUESQ")
|
|
{
|
|
Variaveis.OperacaoEmAndamento.Sensoriamento.DistanciaEsquerda = distancia;
|
|
}
|
|
else if (Sensor.ID == "SUDIR")
|
|
{
|
|
Variaveis.OperacaoEmAndamento.Sensoriamento.DistanciaDireita = distancia;
|
|
}
|
|
|
|
AtualizaGrafico = true;
|
|
break;
|
|
|
|
}
|
|
|
|
if (Sensor.Leituras[0] > Sensor.ValorMaximo)
|
|
{
|
|
Sensor.ValorMaximo = Sensor.Leituras[0];
|
|
}
|
|
else if (Sensor.Leituras[0] < Sensor.ValorMinimo)
|
|
{
|
|
Sensor.ValorMinimo = Sensor.Leituras[0];
|
|
}
|
|
|
|
MovSensoriamentoMotor Motor =
|
|
Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Mov) ?
|
|
((MovimentacaoModel)(Variaveis.DispositivosConectados.FirstOrDefault(x => x.Dispositivo == T_Code.Mov).Dados)).Motores.FirstOrDefault(x => Sensor.ID.Contains(x.ID)) :
|
|
null;
|
|
if (Motor != null)
|
|
{
|
|
Motor.AtualizarSensoresMotor(Sensor);
|
|
}
|
|
|
|
if (AtualizaGrafico)
|
|
{
|
|
Sensor.LogGrafico.Add(new SenSensorimanetoGrafico()
|
|
{
|
|
Momento = DateTime.Now,
|
|
ComponenteID = Sensor.ID,
|
|
Componente = Sensor.Componente,
|
|
Leitura1 = Sensor.Leituras[0],
|
|
Leitura2 = Sensor.Leituras[1],
|
|
Leitura3 = Sensor.Leituras[2],
|
|
Leitura4 = Sensor.Leituras[3],
|
|
AlarmeMinima = Sensor.Leituras[0] < Sensor.LimiteMinimo,
|
|
AlarmeMaxima = Sensor.Leituras[0] > Sensor.LimiteMaximo,
|
|
});
|
|
|
|
if (Sensor.LogGrafico.Count() > LogsManter)
|
|
{
|
|
Sensor.LogGrafico.RemoveAt(0);
|
|
}
|
|
|
|
if (Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Dir))
|
|
{
|
|
//((frmDirPlot)(frmPrincipal.Dispositivos.First(x => x.Dispositivo == T_Code.Dir).frmPlot)).AtualizaGrafico();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine(ex.Message);
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
public string GetTaxaAmostragem()
|
|
{
|
|
return _TaxaAmostragem.ToString("00000");
|
|
}
|
|
|
|
public void SetTaxaAmostragem(int TaxaAmostragem)
|
|
{
|
|
_TaxaAmostragem = TaxaAmostragem;
|
|
}
|
|
|
|
public bool GetStatusConexao()
|
|
{
|
|
return Conectado;
|
|
}
|
|
|
|
public void PopulaGridSensoriamento()
|
|
{
|
|
|
|
}
|
|
|
|
public void AtualizaGridSensoriamento()
|
|
{
|
|
foreach (var Sensor in Sensores.Where(x => x.ID.Contains("MV")).ToList())
|
|
{
|
|
try
|
|
{
|
|
MovSensoriamentoMotor Motor =
|
|
Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Mov) ?
|
|
((MovimentacaoModel)(Variaveis.DispositivosConectados.FirstOrDefault(x => x.Dispositivo == T_Code.Mov).Dados)).Motores.FirstOrDefault(x => Sensor.ID.Contains(x.ID)) :
|
|
null;
|
|
if (Motor != null)
|
|
{
|
|
switch (Sensor.Componente)
|
|
{
|
|
case S_Code.sTMP:
|
|
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[9].Value = Motor.Temperatura.ToString("0.00");
|
|
break;
|
|
case S_Code.sCOR:
|
|
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[10].Value = Motor.Corrente.ToString("0.00");
|
|
frmInstancial.frmPrincipal.gridSenMotores.Rows[Motor.Canal].Cells[11].Value = Motor.Tensao.ToString("0.00");
|
|
break;
|
|
}
|
|
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
public List<PinoutModel> CarregarPinout(string nomeArquivo)
|
|
{
|
|
if (!File.Exists(nomeArquivo))
|
|
{
|
|
var newPinout = PinoutModel.CarregarPinoutPadrao_Wrover();
|
|
File.WriteAllText(nomeArquivo, JsonConvert.SerializeObject(newPinout));
|
|
}
|
|
var pinoutText = File.ReadAllText(nomeArquivo);
|
|
Pinout = JsonConvert.DeserializeObject<PinoutModel[]>(pinoutText).ToList();
|
|
return Pinout;
|
|
}
|
|
|
|
public void SalvarPinout(List<PinoutModel> newPinout, string nomeArquivo)
|
|
{
|
|
File.WriteAllText(nomeArquivo, JsonConvert.SerializeObject(newPinout));
|
|
}
|
|
|
|
public void IniciarRegistrador()
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
public class SensorModel
|
|
{
|
|
public string ID { get; set; }
|
|
public int Prioridade { get; set; }
|
|
public string Descricao { get; set; }
|
|
public S_Code Componente { get; set; }
|
|
public bool Aferir { get; set; } = false;
|
|
public int DelayAmostragem { get; set; } = 500;
|
|
public bool Inicializado { get; set; } = false;
|
|
public bool Testando { get; set; } = false;
|
|
public List<FuncoesPinout> Funcoes { get; set; }
|
|
public List<string[]> Parametros { get; set;} = new List<string[]>();
|
|
|
|
public string UnidadeMedida { get; set; }
|
|
public List<double> Leituras { get; set; }
|
|
public double ValorMinimo { get; set; }
|
|
public double ValorMaximo { get; set; }
|
|
public double LimiteMaximo { get; set; }
|
|
public double LimiteMinimo { get; set; }
|
|
|
|
public List<SenSensorimanetoGrafico> LogGrafico = new List<SenSensorimanetoGrafico>();
|
|
|
|
public string ProtocoloConfiguracaoSensor(List<PinoutModel> Pinout, bool Conectar)
|
|
{
|
|
var _pinout = Pinout.Where(x => x.ComponenteID == ID).ToList();
|
|
string Protocolo = ((int)F_Code.Cfg).ToString() +
|
|
ID.PadRight(5, ' ') + ";" + // 0 ~ 4
|
|
(Conectar ? "1" : "0") + ";" + // 6
|
|
((int)Componente).ToString() + ";" + // 8 ~ 10
|
|
(Aferir ? "1" : "0") + ";" + // 12
|
|
DelayAmostragem.ToString("00000") + ";" + // 14 ~ 18
|
|
Prioridade.ToString("00") + ";" + // 20 ~ 21
|
|
(_pinout.Any(x => x.Funcao != FuncoesPinout.NaoConectado) ? _pinout.FirstOrDefault(x => x.Funcao != FuncoesPinout.NaoConectado).Pino.ToString("00") : "-1") + ";" + // 23 ~ 24
|
|
(_pinout.Any(x => PinoutUtils.PinosSecundarios.Any(y => y == x.Funcao)) ? _pinout.FirstOrDefault(x => PinoutUtils.PinosSecundarios.Any(y => y == x.Funcao)).Pino.ToString("00") : "-1"); // 26 ~ 27
|
|
foreach (var Parametro in Parametros)
|
|
{
|
|
Protocolo += ";" + Parametro[1];
|
|
}
|
|
return Protocolo;
|
|
}
|
|
}
|
|
|
|
public class SenSensorimanetoGrafico
|
|
{
|
|
public DateTime Momento { get; set; }
|
|
public string ComponenteID { get; set; }
|
|
public S_Code Componente { get; set; }
|
|
public double Leitura1 { get; set; }
|
|
public double Leitura2 { get; set; }
|
|
public double Leitura3 { get; set; }
|
|
public double Leitura4 { get; set; }
|
|
public bool AlarmeMaxima { get; set; }
|
|
public bool AlarmeMinima { get; set; }
|
|
}
|
|
}
|