OBJProxy.cs 1.31 KB
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;
            weightSystemOBJProxy = new WeightSystem_OBJProxy(
                objsys_idx,
                OBJ_INTERFACE.OBJ_INTERFACE.WEIGHTS_OBJ_ID,
                gage.mData);

            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);
        }
    }
}