using FLY.FeedbackRenZiJia.OBJ_INTERFACE;
using FLY.OBJComponents.Server.OBJProxy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;

namespace FLY.FeedbackRenZiJia.Server.OBJProxy
{
    public class OBJProxy
    {
        FeedbackHeat_OBJProxy mFeedbackOBJProxy;
        HeatBuf_OBJProxy mBufOBJProxy;
        HeatCell_OBJProxy mCellOBJProxy;
        SnapShotBuf_OBJProxy mSnapShotOBJProxy;
        WarningSystem_OBJProxy mWarnSystemOBJProxy;

        public OBJProxy(int objsys_idx, TDGage gage)
        {
            TDGage mGage = gage;



            mFeedbackOBJProxy = new FeedbackHeat_OBJProxy(objsys_idx, OBJ_INTERFACE_ID.FEEDBACK_ID, mGage.mfeedback);
            mBufOBJProxy = new HeatBuf_OBJProxy(objsys_idx, OBJ_INTERFACE_ID.HEATBUF_ID, mGage.mfeedback.mHeatBuf);
            mCellOBJProxy = new HeatCell_OBJProxy(objsys_idx, OBJ_INTERFACE_ID.HEATCELL_ID, mGage.mfeedback.mHeatCell);
            mSnapShotOBJProxy = new SnapShotBuf_OBJProxy(objsys_idx, OBJ_INTERFACE_ID.SNAPSHOT_ID, mGage.mfeedback.mSnapShotBuf);
            mWarnSystemOBJProxy = new WarningSystem_OBJProxy(objsys_idx, OBJ_INTERFACE_ID.WARNING_OBJ_ID, mGage.mWarning);

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