Commit 634c9abe authored by 潘栩锋's avatar 潘栩锋 🚴

整理 FOBJ 代理,多余的删除

parent e93197eb
......@@ -51,7 +51,6 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Client\BoltMapServiceClient.cs" />
<Compile Include="Client\BorderSearchServiceClient.cs" />
<Compile Include="Client\CoatingSegmentServiceClient.cs" />
<Compile Include="Client\CurveServiceClient.cs" />
......@@ -111,14 +110,12 @@
<Compile Include="OBJ_INTERFACE\GAGEINFO_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\GETSAMPLE_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\INITPARAM_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\OBJ_INTERFACE_ID.cs" />
<Compile Include="OBJ_INTERFACE\PASSWORD_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\PROFILE_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\REJECT_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\SCANCORR_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\TDGAGE_OBJ_INTERFACE.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Server.OBJProxy\BoltMap_OBJProxy.cs" />
<Compile Include="Server.OBJProxy\BorderSearch_OBJProxy.cs" />
<Compile Include="Server.OBJProxy\CoatingSegmentSearch_OBJProxy.cs" />
<Compile Include="Server.OBJProxy\Curve_OBJProxy.cs" />
......
......@@ -10,7 +10,7 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
{
public class BOLTMAP_OBJ_INTERFACE
{
public const UInt32 ID = OBJ_INTERFACE_ID.BOLTMAP_ID;
#region Pack
public class Pack_Params : IPack
{
......
......@@ -9,7 +9,6 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
{
public class COATINGSEGMENT_OBJ_INTERFACE
{
public const UInt32 ID = OBJ_INTERFACE_ID.COATINGSEGMENT_ID;
#region Pack
public class Pack_Params : IPack
{
......
......@@ -8,7 +8,6 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
{
public class GAGEINFO_OBJ_INTERFACE
{
public const UInt32 ID = OBJ_INTERFACE_ID.GAGEINFO_ID;
#region Pack
public class Pack_State : IPack
{
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FLY.Thick.Base.OBJ_INTERFACE
{
public class OBJ_INTERFACE_ID
{
//public const UInt32 BULKDATA_ID = 0x003c0001;
public const UInt32 BORDERSEARCH_ID = 0x30010001;
public const UInt32 CURVE_ID = 0x30020001;
public const UInt32 GET_SAMPLE_ID = 0x30030001;
public const UInt32 REJECT_ID = 0x30040001;
public const UInt32 BOLTCREATEINFO_ID = 0x30050001;
public const UInt32 BOLTMAP_ID = 0x30060001;
public const UInt32 INITPARAM_ID = 0x30070001;
public const UInt32 WARNING_ID = 0x30080001;
public const UInt32 SCANWARNING_ID = 0x30090001;
public const UInt32 REMOTEHISTORY_ID = 0x300b0001;
public const UInt32 COATINGSEGMENT_ID = 0x300c0001;
public const UInt32 CS_HISTORY_ID = 0x300d0001;
public const UInt32 GAGEINFO_ID = 0x300e0001;
public const UInt32 FLYAD_ID = 0x300f0001;
public const UInt32 FIX_ID = 0x30100001;
public const UInt32 PROFILE_ID = 0x30110001;
public const UInt32 PASSWORD_ID = 0x30120001;
public const UInt32 SCANCORR_ID = 0x00220001;
public const UInt32 TDGAGE_ID = 0x00140001;
public const UInt32 DYNAREA_ID = 0x003B0001;
}
}
......@@ -8,7 +8,6 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
{
public class PROFILE_OBJ_INTERFACE
{
public const UInt32 ID = OBJ_INTERFACE_ID.PROFILE_ID;
#region Pack
public class Pack_StringList : IPack
{
......
......@@ -10,7 +10,6 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
{
public class TDGAGE_OBJ_INTERFACE
{
public const UInt32 ID = OBJ_INTERFACE_ID.TDGAGE_ID;
#region Pack
public class Pack_CallStart2 : IPack
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Misc;
using FObjBase;
using FLY.Thick.Base.Common;
using FLY.Thick.Base.IService;
using FLY.Thick.Base.OBJ_INTERFACE;
namespace FLY.Thick.Base.Server.OBJProxy
{
public class BoltMap_OBJProxy : FObj
{
#region 延时推送 MARKNO
const int MARKNO_PUSH_PARAMS = 1;
const int MARKNO_PUSH_BORDER = 2;
const int MARKNO_PUSH_INFO = 3;
#endregion
IBoltMapService mBoltMapService;
public BoltMap_OBJProxy(int objsys_idx, IBoltMapService boltMapService) :base(objsys_idx)
{
ID = BOLTMAP_OBJ_INTERFACE.ID;
mBoltMapService = boltMapService;
mBoltMapService.PropertyChanged += new PropertyChangedEventHandler(mBoltMapService_PropertyChanged);
mBoltMapService.ActiveEvent += new ActiveEventHandler(mBoltMapService_ActiveEvent);
}
void mBoltMapService_ActiveEvent(object sender)
{
FObjBase.PollModule.Current.Poll_JustOnce(
new PollModule.PollHandler(delegate()
{
byte[] buf;
GetValue(null, 0, BOLTMAP_OBJ_INTERFACE.GET_PARAMS, out buf);
CurrObjSys.PushObjInfoEx(
this, BOLTMAP_OBJ_INTERFACE.PUSH_PARAMS,
buf);
}), this, MARKNO_PUSH_PARAMS);
}
void mBoltMapService_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
//if ((e.PropertyName == "FirstBoltNo")||
// (e.PropertyName == "Bolts")
// )
//{
//}
//else
if ((e.PropertyName == "BorderBoltNo_B") ||
(e.PropertyName == "BorderBoltNo_E") ||
(e.PropertyName == "BorderType") ||(e.PropertyName == "Smooth") )
{
FObjBase.PollModule.Current.Poll_JustOnce(
new PollModule.PollHandler(delegate()
{
byte[] buf;
GetValue(null, 0, BOLTMAP_OBJ_INTERFACE.GET_BORDERPARAMS, out buf);
CurrObjSys.PushObjInfoEx(
this, BOLTMAP_OBJ_INTERFACE.PUSH_BORDERPARAMS,
buf);
}), this, MARKNO_PUSH_BORDER);
}
else if ((e.PropertyName == "LastBoltNo") ||
(e.PropertyName == "BoltInterval") ||
(e.PropertyName == "BoltWidth") ||
(e.PropertyName == "PosBegin") ||
(e.PropertyName == "PosEnd"))
{
FObjBase.PollModule.Current.Poll_JustOnce(
new PollModule.PollHandler(delegate()
{
byte[] buf;
GetValue(null, 0, BOLTMAP_OBJ_INTERFACE.GET_BOLTSINFO, out buf);
CurrObjSys.PushObjInfoEx(
this, BOLTMAP_OBJ_INTERFACE.PUSH_BOLTSINFO,
buf);
}), this, MARKNO_PUSH_INFO);
}
}
public override void GetValue(IFConn from, uint srcid, ushort memid, out byte[] infodata)
{
switch (memid)
{
case BOLTMAP_OBJ_INTERFACE.GET_PARAMS:
{
BOLTMAP_OBJ_INTERFACE.Pack_Params p = new BOLTMAP_OBJ_INTERFACE.Pack_Params()
{
boltNo1st = mBoltMapService.FirstBoltNo,
bolts = mBoltMapService.Bolts.ToArray(),
};
infodata = p.ToBytes();
} break;
case BOLTMAP_OBJ_INTERFACE.GET_BORDERPARAMS:
{
BOLTMAP_OBJ_INTERFACE.Pack_BorderParams p = new BOLTMAP_OBJ_INTERFACE.Pack_BorderParams()
{
bordertype = mBoltMapService.BorderType,
borderboltno_b = mBoltMapService.BorderBoltNo_B,
borderboltno_e = mBoltMapService.BorderBoltNo_E,
smooth = mBoltMapService.Smooth
};
infodata = p.ToBytes();
} break;
case BOLTMAP_OBJ_INTERFACE.GET_BOLTSINFO:
{
BOLTMAP_OBJ_INTERFACE.Pack_BoltsInfo p = new BOLTMAP_OBJ_INTERFACE.Pack_BoltsInfo()
{
LastBoltNo = mBoltMapService.LastBoltNo,
BoltInterval = mBoltMapService.BoltInterval,
BoltWidth = mBoltMapService.BoltWidth,
PosBegin = mBoltMapService.PosBegin,
PosEnd = mBoltMapService.PosEnd
};
infodata = p.ToBytes();
}break;
default:
infodata = null;
break;
}
}
public override void SetValue(IFConn from, uint srcid, ushort memid, byte[] infodata)
{
switch (memid)
{
case BOLTMAP_OBJ_INTERFACE.SET_PARAMS:
{
BOLTMAP_OBJ_INTERFACE.Pack_Params p = new BOLTMAP_OBJ_INTERFACE.Pack_Params();
if (p.TryParse(infodata))
{
mBoltMapService.FirstBoltNo = p.boltNo1st;
mBoltMapService.Bolts.Clear();
for(int i=0;i<p.bolts.Length;i++)
{
Range r = p.bolts[i];
mBoltMapService.Bolts.Add(
new Range(){
Begin = r.Begin,
End = r.End});
}
mBoltMapService.Apply();
}
} break;
case BOLTMAP_OBJ_INTERFACE.SET_BORDERPARAMS:
{
BOLTMAP_OBJ_INTERFACE.Pack_BorderParams p = new BOLTMAP_OBJ_INTERFACE.Pack_BorderParams();
if (p.TryParse(infodata))
{
mBoltMapService.BorderType = p.bordertype;
mBoltMapService.BorderBoltNo_B = p.borderboltno_b;
mBoltMapService.BorderBoltNo_E = p.borderboltno_e;
mBoltMapService.Smooth = p.smooth;
mBoltMapService.ApplyBorder();
}
} break;
}
}
}
}
......@@ -15,11 +15,7 @@ namespace FLY.Thick.BulkDataModule
IBulkDataService mBulkData;
public BulkDataService_OBJProxy(int objsys_idx, IBulkDataService bulkdata)
: this(objsys_idx, BULKDATA_OBJ_INTERFACE.ID, bulkdata)
{
}
public BulkDataService_OBJProxy(int objsys_idx, UInt32 id, IBulkDataService bulkdata)
: base(objsys_idx)
{
......
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