using Newtonsoft.Json; using Prism.Mvvm; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TeamAAS_VP.Enums; namespace TeamAAS_VP.Models { /// /// 机器人参数 /// public class RobotInfo : BindableBase { private Guid _Id; public Guid Id { get { return _Id; } set { SetProperty(ref _Id, value); } } private string _RobotName; /// /// 机器人名称 /// public string RobotName { get { return _RobotName; } set { SetProperty(ref _RobotName, value); } } private RobotBrand _RobotBrand = RobotBrand.Default; /// /// 机器人品牌 /// public RobotBrand RobotBrand { get { return _RobotBrand; } set { SetProperty(ref _RobotBrand, value); } } private TCPConnectType _ConnectType = TCPConnectType.Client; /// /// 通讯方式 /// public TCPConnectType ConnectType { get { return _ConnectType; } set { SetProperty(ref _ConnectType, value); } } private string _IP = "192.168.0.1"; /// /// IP地址 /// public string IP { get { return _IP; } set { SetProperty(ref _IP, value); } } private int _Port = 3600; /// /// 端口号 /// public int Port { get { return _Port; } set { SetProperty(ref _Port, value); } } private Terminator _Terminator = Terminator.CRLF; /// /// 结束符 /// public Terminator Terminator { get { return _Terminator; } set { SetProperty(ref _Terminator, value); } } private DataEncoding _DataEncoding=DataEncoding.Default; /// /// 数据编码格式 /// public DataEncoding DataEncoding { get { return _DataEncoding; } set { SetProperty(ref _DataEncoding, value); } } private Guid _PLC; public Guid PLC { get { return _PLC; } set { SetProperty(ref _PLC, value); } } private PlcRobotParameter _PlcRobotParameter=new PlcRobotParameter(); public PlcRobotParameter PlcRobotParameter { get { return _PlcRobotParameter; } set { SetProperty(ref _PlcRobotParameter, value); } } public RobotInfo Clone() { return JsonConvert.DeserializeObject(JsonConvert.SerializeObject(this)); ; } } }