コード例 #1
0
        public override void OnSimulationStop(SmartComponent component)
        {
            base.OnSimulationStop(component);
            egmPositionGuidance.Stop();
            egmLineSensor.Stop();

            egmPositionGuidance = null;
            egmLineSensor       = null;
            monitor             = null;
        }
コード例 #2
0
        public override void OnSimulationStart(SmartComponent component)
        {
            base.OnSimulationStart(component);
            if (monitor != null)
            {
                egmPositionGuidance.Stop();
                egmLineSensor.Stop();

                egmPositionGuidance = null;
                egmLineSensor       = null;
                monitor             = null;
            }
            monitor             = new DemoEgmMonitor();
            egmPositionGuidance = new EgmUdpThread((int)DemoEgmPortNumbers.POS_GUIDE_PORT, 4, 50);
            egmLineSensor       = new EgmUdpThread((int)DemoEgmPortNumbers.LINE_SENSOR_PORT, 4, 50);
            egmPositionGuidance.StartUdp(monitor);
            egmLineSensor.StartUdp(monitor);
        }