using iWareCommon.Utils; using iWareModel; using System; namespace iWareSda { public class PLCService { public LogType _LogType; public bool IsConnected { get; set; } /// /// 打开服务 /// /// public virtual MessageModel OpenService() { this.IsConnected = false; return new MessageModel() { result = true }; } ///// ///// 写入 ///// ///// 地址 ///// 值 ///// //public virtual MessageModel WriteValuePoint(string dbNumber, string offset, object value) //{ // return new MessageModel() // { // result = true // }; //} /// /// 写入 /// /// 地址 /// 值 /// 属性对象 /// public virtual MessageModel WriteValuePoint(string dbNumber, string offset, object value, Object proObj) { return new MessageModel() { result = true }; } /// /// 写入 /// /// 地址 /// 值 /// 属性对象 /// public virtual MessageModel WriteValuePoint(string fullAddress, object value, Object proObj) { return new MessageModel() { result = true }; } /// /// 读取 /// /// DB块名 /// 偏移量 /// /// public virtual object ReadValuePoint(string dbNumber, string offset, Type type = default(Type)) { return null; } /// /// 读取 /// /// 地址 /// /// public virtual object ReadValuePoint(string fullAddress, Type type = default(Type)) { return null; } /// /// 获取最终的DB块地址 /// /// /// /// /// public virtual string GetAddress(string dbNumber, string offset, Type type = default(Type)) { return null; } /// /// 关闭连接 /// public virtual void Close() { } } }