Example #1
0
        //protected DbCmdServer dbServer;
        public MFCC_Base(string mfccid,string devType,int remotePort,int notifyPort,int consolePort,string regRemoteName,Type regRemoteType)
        {
            Comm.DB2.Db2.MFCC_TYPE = mfccid;
            this.devType = devType;
            this.remotePort = remotePort;
            this.notifyPort = notifyPort;
            this.consolePort = consolePort;
            this.regRemoteName = regRemoteName;
            this.regRemoteType = regRemoteType;
            this.mfccid = mfccid;

            this.tmr1min.Elapsed += new System.Timers.ElapsedEventHandler(tmr1min_Elapsed);
            tmr1min.Start();
               //      dbServer = new DbCmdServer();
            init_RemoteInterface();

            try
            {
                if(mfccid!="MFCC_PBX"    )
                load_protocol();
            }
            catch
            {

                ConsoleServer.WriteLine("Loading Protocol error");
                System.Environment.Exit(-1);
            }
            notifier = new EventNotifyServer(notifyPort);

            ConsoleServer.WriteLine("loading Tc ...");
            loadTC_AndBuildManaer();
            IsLoadTcCompleted = true;
            this.AfterDeviceAllStart();
            ConsoleServer.WriteLine("load Tc Completed!");

            check_and_connect_remote_obj(r_host_comm);

            new System.Threading.Thread(HW_StatusDBTask).Start();

              //  new System.Threading.Thread(updateStstask).Start();

            if (!(this is MFCC.MFCC_DataColloetBase))
            {
                tmrSunSet = new ExactIntervalTimer(0,0, 0);
                tmrSunSet.OnElapsed += new OnConnectEventHandler(tmrSunSet_OnElapsed);
            }
        }
Example #2
0
        public HisTravelTimeManager(string secid)
        {
            this.secid = secid;

            tmrEveryDay = new ExactIntervalTimer(0, 0, 10);
            tmrEveryDay.OnElapsed += new OnConnectEventHandler(tmrEveryDay_OnElapsed);
            tmrEveryDay_OnElapsed(null);
        }
Example #3
0
        public MFCC_TEM(string mfccid, string devType, int remotePort, int notifyPort, int consolePort, string regRemoteName, Type regRemoteType)
            : base(mfccid, devType, remotePort, notifyPort, consolePort, regRemoteName, regRemoteType)
        {
            initArray();

            loadVDData();
            loadVIData();
            loadLCSData();

            new System.Threading.Thread(MFCCVD2_ConnectTask).Start();
            new System.Threading.Thread(MFCCVI_ConnectTask).Start();

              tmr1min= new ExactIntervalTimer(10);
              tmr1min.OnElapsed+=new OnConnectEventHandler(tmr1min_OnElapsed);
               //  new System.Threading.Thread(this.TEMTest).Start();
             // nclient = new EventNotifyClient();
        }