Commit ce3f81a8 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 plcOS_OBJProxy 创建错了,导致客户端的 plcOs 连接失败

parent 7b5530ef
using FLY.OBJComponents.Server.OBJProxy; using FLY.OBJComponents.IService;
using FLY.OBJComponents.Server.OBJProxy;
using FObjBase; using FObjBase;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
...@@ -13,9 +14,6 @@ namespace FLY.DownBlowing.Server.OBJProxy ...@@ -13,9 +14,6 @@ namespace FLY.DownBlowing.Server.OBJProxy
class DownBlowingSystem_OBJProxy : FObj class DownBlowingSystem_OBJProxy : FObj
{ {
DownBlowingSystem data; DownBlowingSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
public DownBlowingSystem_OBJProxy(int objsys_idx, DownBlowingSystem data) : base(objsys_idx) public DownBlowingSystem_OBJProxy(int objsys_idx, DownBlowingSystem data) : base(objsys_idx)
...@@ -36,13 +34,14 @@ namespace FLY.DownBlowing.Server.OBJProxy ...@@ -36,13 +34,14 @@ namespace FLY.DownBlowing.Server.OBJProxy
for (int i = 0; i < data.FeederDatas.Count(); i++) for (int i = 0; i < data.FeederDatas.Count(); i++)
objnames.Add($"{nameof(DownBlowingSystem.FeederDatas)}[{i}]", data.FeederDatas[i]); objnames.Add($"{nameof(DownBlowingSystem.FeederDatas)}[{i}]", data.FeederDatas[i]);
syncProp_OBJProxy = new SyncProp_OBJProxy( var syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1, objnames); objsys_idx, ID + 1, objnames);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy( var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx, objsys_idx,
ID + 2, ID + 2,
typeof(IPLCProxySystemService),
data.PLCos data.PLCos
); );
} }
......
using FLY.IBC.Common; using FLY.IBC.Common;
using FLY.IBC.OBJ_INTERFACE; using FLY.IBC.OBJ_INTERFACE;
using FLY.IBC.Server.Model; using FLY.IBC.Server.Model;
using FLY.OBJComponents.IService;
using FLY.OBJComponents.Server.OBJProxy; using FLY.OBJComponents.Server.OBJProxy;
using FObjBase; using FObjBase;
using Newtonsoft.Json; using Newtonsoft.Json;
...@@ -16,9 +17,6 @@ namespace FLY.IBC.Server.OBJProxy ...@@ -16,9 +17,6 @@ namespace FLY.IBC.Server.OBJProxy
class IBCSystem_OBJProxy : FObj class IBCSystem_OBJProxy : FObj
{ {
IBCSystem data; IBCSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
public IBCSystem_OBJProxy(int objsys_idx, IBCSystem data) : base(objsys_idx) public IBCSystem_OBJProxy(int objsys_idx, IBCSystem data) : base(objsys_idx)
...@@ -36,13 +34,19 @@ namespace FLY.IBC.Server.OBJProxy ...@@ -36,13 +34,19 @@ namespace FLY.IBC.Server.OBJProxy
syncProp_OBJProxy = new SyncProp_OBJProxy( var syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1, objnames); objsys_idx, ID + 1, objnames);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy( //plcOS_OBJProxy = new PLCProxySystem_OBJProxy(
// objsys_idx,
// ID + 2,
// data.PLCos
// );
var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx, objsys_idx,
ID + 2, ID + 2,
typeof(IPLCProxySystemService),
data.PLCos data.PLCos
); );
} }
......
...@@ -9,15 +9,13 @@ using FLY.Weight.Common; ...@@ -9,15 +9,13 @@ using FLY.Weight.Common;
using FLY.OBJComponents.Server.OBJProxy; using FLY.OBJComponents.Server.OBJProxy;
using System.ComponentModel; using System.ComponentModel;
using FLY.Weight.Server.Model; using FLY.Weight.Server.Model;
using FLY.OBJComponents.IService;
namespace FLY.Weight.Server.OBJProxy namespace FLY.Weight.Server.OBJProxy
{ {
public class WeightSystem_OBJProxy : FObj public class WeightSystem_OBJProxy : FObj
{ {
WeightSystem data; WeightSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
public WeightSystem_OBJProxy(int objsys_idx, WeightSystem data):base(objsys_idx) public WeightSystem_OBJProxy(int objsys_idx, WeightSystem data):base(objsys_idx)
...@@ -33,12 +31,13 @@ namespace FLY.Weight.Server.OBJProxy ...@@ -33,12 +31,13 @@ namespace FLY.Weight.Server.OBJProxy
for (int i = 0; i < data.Items.Count(); i++) for (int i = 0; i < data.Items.Count(); i++)
objnames.Add($"Items[{i}]", data.Items[i]); objnames.Add($"Items[{i}]", data.Items[i]);
syncProp_OBJProxy = new SyncProp_OBJProxy( var syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1, objnames); objsys_idx, ID + 1, objnames);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy( var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx, objsys_idx,
ID + 2, ID + 2,
typeof(IPLCProxySystemService),
data.PLCos data.PLCos
); );
......
...@@ -9,14 +9,13 @@ using FLY.Weight2.Common; ...@@ -9,14 +9,13 @@ using FLY.Weight2.Common;
using FLY.OBJComponents.Server.OBJProxy; using FLY.OBJComponents.Server.OBJProxy;
using System.ComponentModel; using System.ComponentModel;
using FLY.Weight2.Server.Model; using FLY.Weight2.Server.Model;
using FLY.OBJComponents.IService;
namespace FLY.Weight2.Server.OBJProxy namespace FLY.Weight2.Server.OBJProxy
{ {
public class WeightSystem_OBJProxy : FObj public class WeightSystem_OBJProxy : FObj
{ {
WeightSystem data; WeightSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
...@@ -33,12 +32,14 @@ namespace FLY.Weight2.Server.OBJProxy ...@@ -33,12 +32,14 @@ namespace FLY.Weight2.Server.OBJProxy
for (int i = 0; i < data.Items.Count(); i++) for (int i = 0; i < data.Items.Count(); i++)
objnames.Add($"{nameof(data.Items)}[{i}]", data.Items[i]); objnames.Add($"{nameof(data.Items)}[{i}]", data.Items[i]);
syncProp_OBJProxy = new SyncProp_OBJProxy(
var syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1, objnames); objsys_idx, ID + 1, objnames);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy( var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx, objsys_idx,
ID + 2, ID + 2,
typeof(IPLCProxySystemService),
data.PLCos data.PLCos
); );
......
...@@ -9,35 +9,37 @@ using System.ComponentModel; ...@@ -9,35 +9,37 @@ using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using FLY.OBJComponents.IService;
namespace FLY.Winder.Server.OBJProxy namespace FLY.Winder.Server.OBJProxy
{ {
public class WinderSystem_OBJProxy : FObj public class WinderSystem_OBJProxy : FObj
{ {
WinderSystem data; WinderSystem data;
PLCProxySystem_OBJProxy plcos_objproxy;
SyncProp_OBJProxy syncProp_OBJProxy;
public WinderSystem_OBJProxy(int objsys_idx, WinderSystem data) : base(objsys_idx) public WinderSystem_OBJProxy(int objsys_idx, WinderSystem data) : base(objsys_idx)
{ {
ID = OBJ_INTERFACE.OBJ_INTERFACE.WINDER_OBJ_ID; ID = OBJ_INTERFACE.OBJ_INTERFACE.WINDER_OBJ_ID;
this.data = data; this.data = data;
syncProp_OBJProxy = new SyncProp_OBJProxy( //--------------------------------------------------------------
objsys_idx, ID + 1, //属性同步
new Dictionary<string, INotifyPropertyChanged> Dictionary<string, INotifyPropertyChanged> objnames = new Dictionary<string, INotifyPropertyChanged>();
{ objnames.Add(nameof(data.Accessory), data.Accessory);
{ "Accessory", data.Accessory }, for (int i = 0; i < data.Items.Count(); i++)
{ "Items[0]", data.Items[0]}, objnames.Add($"{nameof(data.Items)}[{i}]", data.Items[i]);
{ "Items[1]", data.Items[1]}
});
plcos_objproxy = new PLCProxySystem_OBJProxy(
var syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1, objnames);
var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx, objsys_idx,
ID + 2, ID + 2,
typeof(IPLCProxySystemService),
data.PLCos data.PLCos
); );
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment