Exemplo n.º 1
0
        public void PostInitial()
        {
            //I_MFCC_VD robj =(I_MFCC_VD) RemoteBuilder.GetRemoteObj(typeof(I_MFCC_VD),
               //    RemoteBuilder.getRemoteUri("192.168.22.89",(int) RemotingPortEnum.MFCC_VD1, "MFCC_VD"));

               //robj.setRealTime("VD231", 1, 0, 1);
               ConsoleServer.WriteLine("設備管理啟動中......!");
               device_mgr = new Host.TC.DevcieManager(mfcc_mgr);
               ConsoleServer.WriteLine("設備管理啟動完成!");
               line_mgr = new LineManager();
               output_device_fetch_mgr = new OutputDevicFetchManager(this.device_mgr);

               FiveMinTask = new FiveMinTask();

               OneMinTask = new OneMinTask();

               avimgr = new Host.AVI.AVIManager();
               etcmgr = new Host.ETC.ETC_Manager();

               tmr1min.Start();
               System.Threading.Thread.Sleep(10000);

               getinitVd5minData();

               event_mgr = new Host.Event.EventManager();

               moving_construct_mgr = new Host.Event.MovingConstruct.MovingConstructManager();
               jammgr = new Host.Event.Jam.JamManager(device_mgr);
               tem_mgr = new Host.Event.TEM.TemManager();
               route_mgr = new Host.Event.Redirect.RouteRedirectManager();

            #if DEBUG
               //    RemoteInterface.HC.FetchDeviceData[] d = output_device_fetch_mgr.Fetch(new string[] { "CMS" }, "N1",150000, 174200);
               //    jammgr.DoVD_InteropData("VD-N6-E-17.6", System.DateTime.Now.AddSeconds(-System.DateTime.Now.Second));
               //  jammgr.DoVD_InteropData( "VD-N6-E-18.0", System.DateTime.Now.AddSeconds(-System.DateTime.Now.Second));

            #endif

               weather_mgr = new Host.Event.Weather.WeatherManager();
               iid_mgr = new Host.Event.IID.IIDManager();
        }
Exemplo n.º 2
0
        public void PostInitial()
        {
            //I_MFCC_VD robj =(I_MFCC_VD) RemoteBuilder.GetRemoteObj(typeof(I_MFCC_VD),
               //    RemoteBuilder.getRemoteUri("192.168.22.89",(int) RemotingPortEnum.MFCC_VD1, "MFCC_VD"));

               //robj.setRealTime("VD231", 1, 0, 1);
               ConsoleServer.WriteLine("設備管理啟動中......!");
               device_mgr = new Host.TC.DevcieManager(mfcc_mgr);
               ConsoleServer.WriteLine("設備管理啟動完成!");

               vd5minavg_mgr = new FiveMinVDAVGDataManager();
            #if DEBUG
               //new HC_FWIS_Robj().RGS_setManualGenericDisplay("RGS-N6-W-0.4",
               // new RGS_GenericDisplay_Data(2, 0, new RGS_Generic_ICON_Data[0],
               //     new RGS_Generic_Message_Data[]{new  RGS_Generic_Message_Data("系統測試",
               //       new System.Drawing.Color[]{System.Drawing.Color.Red,System.Drawing.Color.Red,System.Drawing.Color.Red,System.Drawing.Color.Red},new System.Drawing.Color[]{System.Drawing.Color.Black,System.Drawing.Color.Black,System.Drawing.Color.Black,System.Drawing.Color.Black},0,0)}
               //     , new RGS_Generic_Section_Data[0]),false);
               //(this.device_mgr["RGS-N6-W-0.4"].getRemoteObj() as I_MFCC_RGS).setGenericDisplay("RGS-N6-W-0.4",
               // new RGS_GenericDisplay_Data(2, 0, new RGS_Generic_ICON_Data[0],
               //     new RGS_Generic_Message_Data[]{new  RGS_Generic_Message_Data("系統測試",
               //       new System.Drawing.Color[]{System.Drawing.Color.Red,System.Drawing.Color.Red,System.Drawing.Color.Red,System.Drawing.Color.Red},new System.Drawing.Color[]{System.Drawing.Color.Black,System.Drawing.Color.Black,System.Drawing.Color.Black,System.Drawing.Color.Black},0,0)}
               //     , new RGS_Generic_Section_Data[0]));
               //    RemoteInterface.HC.FetchDeviceData[] d = output_device_fetch_mgr.Fetch(new string[] { "CMS" }, "N1",150000, 174200);
               //    jammgr.DoVD_InteropData("VD-N6-E-17.6", System.DateTime.Now.AddSeconds(-System.DateTime.Now.Second));
               //  jammgr.DoVD_InteropData( "VD-N6-E-18.0", System.DateTime.Now.AddSeconds(-System.DateTime.Now.Second));
            #endif
               this.rgs_polygon_section_mapping = new RGS_PolygonSectionMapping();
               line_mgr = new LineManager();

               output_device_fetch_mgr = new OutputDevicFetchManager(this.device_mgr);

               //    output_device_fetch_mgr.Fetch(new string[] { "RMS" }, "N6" , "W", 35000, 1, 0, false);

            #if !DEBUG
               FiveMinTask = new FiveMinTask();

               //    OneMinTask = new OneMinTask();
              // avimgr = new Host.AVI.AVIManager();
             //  etcmgr = new Host.ETC.ETC_Manager();  //2014-5-14 停用
            #endif
               etcmgr = new Host.ETC.ETC_Manager();
            OneMinTask = new OneMinTask();
               avimgr = new Host.AVI.AVIManager();
               tmr1min.Start();
               System.Threading.Thread.Sleep(10000);

            #if DEBUG
               //{
               //    string ret = "";
               //    try
               //    {
               //        ret = "FiveMinQueueCnt:" + Program.matrix.vd5minavg_mgr.VDFiveMinQueueCnt;
               //        foreach (DeviceBaseWrapper dev in Program.matrix.device_mgr.getDataDeviceEnum())
               //        {
               //            if (dev is VDDeviceWrapper)
               //            {
               //                VDDeviceWrapper vddev = dev as VDDeviceWrapper;
               //                ret += vddev.ToString() + "\r\n";

               //            }
               //        }

               //     Console.WriteLine(ret);
               //    }
               //    catch (Exception ex)
               //    {
               //        throw new RemoteException(ex.Message + "," + ex.StackTrace);
               //    }
               //}
               //int vol=0,spd=0,occ=0,level=0,ttime=0,lttime=0,httime=0;
               //this.line_mgr["N3"].getAllTrafficData("N", 224700, 231400, ref vol, ref spd, ref occ, ref level, ref ttime, ref lttime, ref httime);
            #endif
               event_mgr = new Host.Event.EventManager();

            #if DEBUG

            #else
               cctvmgr = new CCTV.CCTV_Manager();

               moving_construct_mgr = new Host.Event.MovingConstruct.MovingConstructManager();
              // moving_construct_mgr.setEvent(1,"test",DateTime.Now,"N1","S",15000,16000,16,"0001","TEST","Y" );
               //moving_construct_mgr.setEvent(1, "test", DateTime.Now, "N1", "S", 16000, 17000, 16, "0001", "TEST", "Y");
             //  moving_construct_mgr.CloseMovingConstructEvent(1);
            #endif
               jammgr = new Host.Event.Jam.JamManager(device_mgr);
            #if DEBUG
               //Program.initRemoteInterface();
               //Console.ReadKey();
               route_mgr74 = new Host.Event.Redirect74.RouteRedirectManagerT74();
               route_mgr = new Host.Event.Redirect.RouteRedirectManager();
               metro_network_mgr = new Event.MetroNetwork.MetroNetworkManager();
            #endif
            #if !DEBUG
               tem_mgr = new Host.Event.TEM.TemManager();

               rampctl_mgr = new Event.RampControl.RampControl_Manager();
               metro_network_mgr = new Event.MetroNetwork.MetroNetworkManager();
               route_mgr74 = new Host.Event.Redirect74.RouteRedirectManagerT74();
               route_mgr = new Host.Event.Redirect.RouteRedirectManager();
               ltr_mgr = new Event.LTR.LTR_Manager();

               weather_mgr = new Host.Event.Weather.WeatherManager();

               iid_mgr = new Host.Event.IID.IIDManager();
               svcarea_mgr = new Event.ServiceArea.ServiceAreaManager();
               csls_mgr = new Event.CSLSControl.CSLSControlEventManager(device_mgr);
            #endif
               Program.initRemoteInterface();
               try
               {
               WebService.SendSMS("0988163835", "host is online!");
               }
               catch(Exception ex) {

               Console.WriteLine(ex.Message + "," + ex.StackTrace);
               ;}
            #if !DEBUG
               try
               {
               WebService.SendSMS("0932500190", "host is online!");
               }
               catch { ;}
               try
               {
               WebService.SendSMS("0919712057", "host is online!");
               }
               catch { ;}
            #endif

            #if DEBUG
               //RemoteInterface.HC.I_HC_Comm rrobj = (RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_Comm),
               //    RemoteInterface.RemoteBuilder.getRemoteUri("10.21.50.224", (int)RemoteInterface.RemotingPortEnum.HOST_FIWS, "Comm"));
               //int pr = 0;
               // rrobj.GetCurrentOutput("CMS-N3-N-123.6", ref pr);
               //(this.device_mgr["RGS-N6-W-0.4"].getRemoteObj() as I_MFCC_RGS).setGenericDisplay("RGS-N6-W-0.4",
               // new RGS_GenericDisplay_Data(2, 0, new RGS_Generic_ICON_Data[0],
               //     new RGS_Generic_Message_Data[]{new  RGS_Generic_Message_Data("系統測試",
               //       new System.Drawing.Color[]{System.Drawing.Color.Red,System.Drawing.Color.Red,System.Drawing.Color.Red,System.Drawing.Color.Red},new System.Drawing.Color[]{System.Drawing.Color.Black,System.Drawing.Color.Black,System.Drawing.Color.Black,System.Drawing.Color.Black},0,0)}
               //     , new RGS_Generic_Section_Data[0]));
               //    RemoteInterface.HC.FetchDeviceData[] d = output_device_fetch_mgr.Fetch(new string[] { "CMS" }, "N1",150000, 174200);
               //    jammgr.DoVD_InteropData("VD-N6-E-17.6", System.DateTime.Now.AddSeconds(-System.DateTime.Now.Second));
               //  jammgr.DoVD_InteropData( "VD-N6-E-18.0", System.DateTime.Now.AddSeconds(-System.DateTime.Now.Second));
            #else
               apid_mgr = new Event.APID.APIDManager();
            #endif
        }