| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- 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;
- using TeamAAS_VP.Models.PLC;
- namespace TeamAAS_VP.Models
- {
- /// <summary>
- /// 机器人参数
- /// </summary>
- public class RobotInfo : BindableBase
- {
- private Guid _Id;
- public Guid Id
- {
- get { return _Id; }
- set { SetProperty(ref _Id, value); }
- }
- private int _RobotNo;
- /// <summary>
- /// 机器人编号
- /// </summary>
- public int RobotNo
- {
- get { return _RobotNo; }
- set { SetProperty(ref _RobotNo, value); }
- }
- private string _RobotName;
- /// <summary>
- /// 机器人名称
- /// </summary>
- public string RobotName
- {
- get { return _RobotName; }
- set { SetProperty(ref _RobotName, value); }
- }
- private RobotBrand _RobotBrand = RobotBrand.Default;
- /// <summary>
- /// 机器人品牌
- /// </summary>
- public RobotBrand RobotBrand
- {
- get { return _RobotBrand; }
- set { SetProperty(ref _RobotBrand, value); }
- }
- private TCPConnectType _ConnectType = TCPConnectType.Client;
- /// <summary>
- /// 通讯方式
- /// </summary>
- public TCPConnectType ConnectType
- {
- get { return _ConnectType; }
- set { SetProperty(ref _ConnectType, value); }
- }
- private string _IP = "192.168.0.1";
- /// <summary>
- /// IP地址
- /// </summary>
- public string IP
- {
- get { return _IP; }
- set { SetProperty(ref _IP, value); }
- }
- private int _Port = 3600;
- /// <summary>
- /// 端口号
- /// </summary>
- public int Port
- {
- get { return _Port; }
- set { SetProperty(ref _Port, value); }
- }
- private Terminator _Terminator = Terminator.CRLF;
- /// <summary>
- /// 结束符
- /// </summary>
- public Terminator Terminator
- {
- get { return _Terminator; }
- set { SetProperty(ref _Terminator, value); }
- }
- private DataEncoding _DataEncoding=DataEncoding.Default;
- /// <summary>
- /// 数据编码格式
- /// </summary>
- public DataEncoding DataEncoding
- {
- get { return _DataEncoding; }
- set { SetProperty(ref _DataEncoding, value); }
- }
- private double _StepDistance=1.0;
- /// <summary>
- /// 步进距离
- /// </summary>
- public double StepDistance
- {
- get { return _StepDistance; }
- set { SetProperty(ref _StepDistance, value); }
- }
- private double _SafeZ;
- /// <summary>
- /// Z轴的安全高度
- /// </summary>
- public double SafeZ
- {
- get { return _SafeZ; }
- set { SetProperty(ref _SafeZ, value); }
- }
- private Guid _PLC;
- /// <summary>
- /// 对应的PLC
- /// </summary>
- 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<RobotInfo>(JsonConvert.SerializeObject(this)); ;
- }
- }
- }
|