using Prism.Mvvm; using SKMC.Api.Motion.Control; using SKMC.Api.Motion.Driver; using SKMC.Api.Motion.Model; using System.Collections.Generic; namespace SKMC.Api.Motion { /// /// 运动控制缓存 /// public abstract class MotionCacher : BindableBase { /// /// DI模块数量 /// public int DevDiNum { get; set; } /// /// DO模块数量 /// public int DevDoNum { get; set; } /// /// 运动控制卡数据解析层 /// public IMotionDriverParser MotionDriverParser { get; set; } /// /// 运动控制卡接口层 /// public IMotionDriver MotionDriver { get; set; } /// /// 运动控制卡高级接口层 /// public IMotionDriverAdvance MotionDriverAdvance { get; set; } /// /// 运动控制高级接口 /// public IMotionControl MotionControl { get; set; } private int _ecatStatusNow; /// /// Ecat总线当前状态,0为正常,非0为异常码 /// public int MotionEcatStatusNow { get { return _ecatStatusNow; } set { _ecatStatusNow = value; RaisePropertyChanged(); } } private int _ecatStatusLatch; /// /// Ecat总线状态锁存,0为正常,非0为异常码。只要检测到一次Ecat连接异常就不为0直到重连总线或者重启程序并连接成功 /// public int MotionEcatStatusLatch { get { return _ecatStatusLatch; } set { _ecatStatusLatch = value; RaisePropertyChanged(); } } /// /// Axis对象集 /// public List MotionAxises { get; set; } = new List(); /// /// DI 模块集 /// public List MotionDiDevs { get; set; } = new List(); /// /// DO 模块集 /// public List MotionDoDevs { get; set; } = new List(); /// /// AO 数据点集 /// public List MotionAos { get; set; } = new List(); /// /// SDO 数据集 /// public List MotionSdos { get; set; } = new List(); /// /// 可写PDO数据集 /// public List MotionWritePdos { get; set; } = new List(); /// /// 只读PDO数据集 /// public List MotionReadPdos { get; set; } = new List(); public abstract MotionIO GetMotionDi(string code); public abstract MotionIO GetMotionDo(string code); public abstract MotionIO GetMotionDio(string code); public abstract MotionAO GetMotionAO(string code); public abstract MotionPdo GetMotionWritePdo(string code); public abstract MotionPdo GetMotionReadPdo(string code); public abstract MotionAxis GetMotionAxis(string axisCode); public abstract MotionAxis GetMotionAxis(short axisNo); } }