BDU/ATS/Models/DeviceModel.cs

55 lines
1.3 KiB
C#

using Newtonsoft.Json;
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
namespace BDU.Models
{
[AddINotifyPropertyChangedInterface]
public class DeviceModel
{
public DeviceModel()
{
}
public DeviceModel(DeviceModel source)
{
ID = source.ID;
ParameterID = source.ParameterID;
Name = source.Name;
Connected = source.Connected;
ErrorMessage = source.ErrorMessage;
Type = source.Type;
ConnectString = source.ConnectString;
CommunicationProtocol = source.CommunicationProtocol;
Description = source.Description;
}
public Guid ID { get; set; } = Guid.NewGuid();
public Guid ParameterID { get; set; }
public string Name { get; set; } = "";
[JsonIgnore]
public bool Connected { get; set; }
[JsonIgnore]
public string? ErrorMessage { get; set; }
public string Type { get; set; } = "Tcp";
public string ConnectString { get; set; } = "";
[JsonIgnore]
public object? CommunicationProtocol { get; set; }
public string Description { get; set; } = "";
}
}