Exemplo n.º 1
0
 void __DEBUG_OnBooleanChanged(CVariable sender, bool value)
 {
     if (_drvSocket != null)
     {
         _drvSocket.EnableLog(value, value);
     }
 }
Exemplo n.º 2
0
        protected override void OnInstancingCompleted()
        {
            base.OnInstancingCompleted();

            dbinterface = new DBInterface();

            sorterMainSendPort          = PORT;
            sorterSortedConfirmRecvPort = PORT + 1;
            sorterDestinationSendPort   = PORT + 2;

            _itemDataMgr = new CSorterItemDataManager();

            _drvSocket = new SocketDriver(EQP_ID, 3, IP, PORT, false);
            _drvSocket.OnRecievePacket += _drvSocket_OnRecievePacket;
            _drvSocket.OnConnect       += drv_OnConnect;
            _drvSocket.EnableLog(true, true);

            foreach (CElement element in this.Elements.Values)
            {
                System.Threading.Thread.Sleep(1);
            }

            heartbeatTimer = new System.Timers.Timer()
            {
                Interval = 5 * 1000
            };
            heartbeatTimer.Elapsed += new System.Timers.ElapsedEventHandler(heartbeatTimer_Elapsed);
            //heartbeatTimer.Start();
        }
Exemplo n.º 3
0
        protected override void OnInstancingCompleted()
        {
            base.OnInstancingCompleted();

            dbinterface = new DBInterface();

            sorterMainSendPort          = PORT;
            sorterSortedConfirmRecvPort = PORT + 1;
            sorterDestinationSendPort   = PORT + 2;

            itemDataMgr = new CSorterItemDataManager();

            drvSocket = new SocketDriver();
            drvSocket.OnRecievePacket += drvSocket_OnRecievePacket;
            drvSocket.OnConnect       += Drv_OnConnect;
            drvSocket.SocketConnected(EQP_ID, 3, IP, PORT, true);

            drvSocket.EnableLog(true, true);

            foreach (CElement element in this.Elements.Values)
            {
                if (element is IpsModule)
                {
                    IpsModule bcrmodule = (IpsModule)element;
                    bcrmodule.OnIPSResult += IPS_OnIPSResult;
                    bcrmodule.InitDriver();
                }

                System.Threading.Thread.Sleep(1);
            }

            __DEBUG.OnBooleanChanged           += __DEBUG_OnBooleanChanged;
            __SET_CONFIG_SEND.OnBooleanChanged += __SET_CONFIG_SEND_OnBooleanChanged;

            heartbeatTimer = new System.Timers.Timer()
            {
                Interval = 5 * 1000
            };
            heartbeatTimer.Elapsed += new System.Timers.ElapsedEventHandler(HeartbeatTimer_Elapsed);
            //heartbeatTimer.Start();
        }