OBJProxy.cs 1.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
using FLY.OBJComponents.Server.OBJProxy;
using FLY.Weight2.Server.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Weight2.Server.OBJProxy
{
    public class OBJProxy
    {
        WeightSystem_OBJProxy weightSystemOBJProxy;
        /// <summary>
        /// 流量
        /// </summary>
        Buffer_OBJProxy<Lc_Flow> mFlowListOBJProxy;


        WarningSystem_OBJProxy mWarnSystemOBJProxy;

        public OBJProxy(int objsys_idx, TDGage gage)
        {
            TDGage mGage = gage;
26 27 28 29
            weightSystemOBJProxy = new WeightSystem_OBJProxy(
                objsys_idx,
                OBJ_INTERFACE.OBJ_INTERFACE.WEIGHTS_OBJ_ID,
                gage.mData);
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

            mFlowListOBJProxy = new Buffer_OBJProxy<Lc_Flow>(
                objsys_idx,
                OBJ_INTERFACE.OBJ_INTERFACE.WEIGHTS_OBJ_FLOW_ID,
                gage.mHistoryDb.FlowBuffer);

            mWarnSystemOBJProxy = new WarningSystem_OBJProxy(
                objsys_idx,
                OBJ_INTERFACE.OBJ_INTERFACE.WARNING_OBJ_ID,
                gage.mWarning);

            weightSystemOBJProxy.CurrObjSys.Start_Conn_Server(
                new IPEndPoint(IPAddress.Any, gage.mSysParam.OBJ_Port), weightSystemOBJProxy.ID);
        }
    }
}