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 Newtonsoft.Json;
using System;
......@@ -13,9 +14,6 @@ namespace FLY.DownBlowing.Server.OBJProxy
class DownBlowingSystem_OBJProxy : FObj
{
DownBlowingSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
public DownBlowingSystem_OBJProxy(int objsys_idx, DownBlowingSystem data) : base(objsys_idx)
......@@ -36,13 +34,14 @@ namespace FLY.DownBlowing.Server.OBJProxy
for (int i = 0; i < data.FeederDatas.Count(); 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);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy(
var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx,
ID + 2,
typeof(IPLCProxySystemService),
data.PLCos
);
}
......
using FLY.IBC.Common;
using FLY.IBC.OBJ_INTERFACE;
using FLY.IBC.Server.Model;
using FLY.OBJComponents.IService;
using FLY.OBJComponents.Server.OBJProxy;
using FObjBase;
using Newtonsoft.Json;
......@@ -16,9 +17,6 @@ namespace FLY.IBC.Server.OBJProxy
class IBCSystem_OBJProxy : FObj
{
IBCSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
public IBCSystem_OBJProxy(int objsys_idx, IBCSystem data) : base(objsys_idx)
......@@ -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);
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,
ID + 2,
typeof(IPLCProxySystemService),
data.PLCos
);
}
......
......@@ -9,15 +9,13 @@ using FLY.Weight.Common;
using FLY.OBJComponents.Server.OBJProxy;
using System.ComponentModel;
using FLY.Weight.Server.Model;
using FLY.OBJComponents.IService;
namespace FLY.Weight.Server.OBJProxy
{
public class WeightSystem_OBJProxy : FObj
{
WeightSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
public WeightSystem_OBJProxy(int objsys_idx, WeightSystem data):base(objsys_idx)
......@@ -33,12 +31,13 @@ namespace FLY.Weight.Server.OBJProxy
for (int i = 0; i < data.Items.Count(); i++)
objnames.Add($"Items[{i}]", data.Items[i]);
syncProp_OBJProxy = new SyncProp_OBJProxy(
var syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1, objnames);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy(
var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx,
ID + 2,
typeof(IPLCProxySystemService),
data.PLCos
);
......
......@@ -9,14 +9,13 @@ using FLY.Weight2.Common;
using FLY.OBJComponents.Server.OBJProxy;
using System.ComponentModel;
using FLY.Weight2.Server.Model;
using FLY.OBJComponents.IService;
namespace FLY.Weight2.Server.OBJProxy
{
public class WeightSystem_OBJProxy : FObj
{
WeightSystem data;
SyncProp_OBJProxy syncProp_OBJProxy;
PLCProxySystem_OBJProxy plcOS_OBJProxy;
......@@ -33,12 +32,14 @@ namespace FLY.Weight2.Server.OBJProxy
for (int i = 0; i < data.Items.Count(); 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);
plcOS_OBJProxy = new PLCProxySystem_OBJProxy(
var plcOS_OBJProxy = new FObjBase.Reflect.Reflect_Proxy(
objsys_idx,
ID + 2,
typeof(IPLCProxySystemService),
data.PLCos
);
......
......@@ -9,35 +9,37 @@ using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FLY.OBJComponents.IService;
namespace FLY.Winder.Server.OBJProxy
{
public class WinderSystem_OBJProxy : FObj
{
WinderSystem data;
PLCProxySystem_OBJProxy plcos_objproxy;
SyncProp_OBJProxy syncProp_OBJProxy;
public WinderSystem_OBJProxy(int objsys_idx, WinderSystem data) : base(objsys_idx)
{
ID = OBJ_INTERFACE.OBJ_INTERFACE.WINDER_OBJ_ID;
this.data = data;
syncProp_OBJProxy = new SyncProp_OBJProxy(
objsys_idx, ID + 1,
new Dictionary<string, INotifyPropertyChanged>
{
{ "Accessory", data.Accessory },
{ "Items[0]", data.Items[0]},
{ "Items[1]", data.Items[1]}
});
//--------------------------------------------------------------
//属性同步
Dictionary<string, INotifyPropertyChanged> objnames = new Dictionary<string, INotifyPropertyChanged>();
objnames.Add(nameof(data.Accessory), data.Accessory);
for (int i = 0; i < data.Items.Count(); i++)
objnames.Add($"{nameof(data.Items)}[{i}]", data.Items[i]);
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,
ID + 2,
typeof(IPLCProxySystemService),
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