Ejemplo n.º 1
0
 virtual public void InitialDriver(LocateDriverConfig driverConfig, AlarmHandler alarmHandler, string normalLogName)
 {
     this.normalLogName = normalLogName;
     this.DriverConfig  = driverConfig;
     this.alarmHandler  = alarmHandler;
     device             = driverConfig.LocateDriverType.ToString();
     InitialConfig(driverConfig.Path);
 }
Ejemplo n.º 2
0
 override public void InitialDriver(LocateDriverConfig driverConfig, AlarmHandler alarmHandler, string normalLogName)
 {
     LocateType         = EnumLocateType.Normal;
     this.normalLogName = normalLogName;
     this.DriverConfig  = driverConfig;
     this.alarmHandler  = alarmHandler;
     device             = driverConfig.LocateDriverType.ToString();
     logger             = LoggerAgent.Instance.GetLooger(driverConfig.LocateDriverType.ToString());
     InitialConfig(driverConfig.Path);
 }
Ejemplo n.º 3
0
        private bool ControllersInitial()
        {
            string xmlTarget = "";

            try
            {
                UserLoginout = new UserAgent();

                xmlTarget  = "MapHandler";
                MapControl = new MapHandler(normalLogName);
                OnComponentIntialDoneEvent?.Invoke(this, new InitialEventArgs(String.Concat(xmlTarget, " 初始化成功"))
                {
                    Scuess = true
                });

                xmlTarget    = "AlarmHandler";
                AlarmHandler = new AlarmHandler();
                OnComponentIntialDoneEvent?.Invoke(this, new InitialEventArgs(String.Concat(xmlTarget, " 初始化成功"))
                {
                    Scuess = true
                });

                xmlTarget   = "MIPCControlHandler";
                MipcControl = new MIPCControlHandler(this, AlarmHandler);
                OnComponentIntialDoneEvent?.Invoke(this, new InitialEventArgs(String.Concat(xmlTarget, " 初始化成功"))
                {
                    Scuess = true
                });

                xmlTarget   = "MoveControlHandler";
                MoveControl = new MoveControlHandler(MipcControl, AlarmHandler);
                OnComponentIntialDoneEvent?.Invoke(this, new InitialEventArgs(String.Concat(xmlTarget, " 初始化成功"))
                {
                    Scuess = true
                });

                xmlTarget         = "LoadUnloadControlHandler";
                LoadUnloadControl = new LoadUnloadControlHandler(MipcControl, AlarmHandler);
                OnComponentIntialDoneEvent?.Invoke(this, new InitialEventArgs(String.Concat(xmlTarget, " 初始化成功"))
                {
                    Scuess = true
                });

                return(true);
            }
            catch
            {
                OnComponentIntialDoneEvent?.Invoke(this, new InitialEventArgs(String.Concat(xmlTarget, " 初始化失敗"), true));
                return(false);
            }
        }
Ejemplo n.º 4
0
        public MotionControlHandler(MIPCControlHandler mipcControl, AlarmHandler alarmHandler, string normalLogName)
        {
            this.mipcControl  = mipcControl;
            this.alarmHandler = alarmHandler;
            move            = localData.MoveControlData.CreateMoveCommandConfig.Move;
            turn_Moving     = localData.MoveControlData.CreateMoveCommandConfig.Turn_Moving;
            ems             = localData.MoveControlData.CreateMoveCommandConfig.EMS;
            turn            = localData.MoveControlData.CreateMoveCommandConfig.Turn;
            eq              = localData.MoveControlData.CreateMoveCommandConfig.EQ;
            SimulateControl = new SimulateControl("SimulateControl");

            this.normalLogName = normalLogName;
            setPositionTimer.Restart();
            ReadTurnParameterXML();

            spinTurnStopTheta = computeFunction.GetAccDecDistance(turn.Velocity, 0, turn.Deceleration, turn.Jerk);
        }
Ejemplo n.º 5
0
        public LoadUnloadControlHandler(MIPCControlHandler mipcControl, AlarmHandler alarmHandler)
        {
            this.mipcControl  = mipcControl;
            this.alarmHandler = alarmHandler;

            //ReadXML();

            // switch(config.Type)
            // {
            // loadUnload = new LoadUnload_AGC();
            // }

            //loadUnload.Initial(mipcControl, config.PIOType);
            //

            thread = new Thread(LoadUnloadThread);
            thread.Start();
        }
Ejemplo n.º 6
0
        public LocateControlHandler(AlarmHandler alarmHandler, string normalLogName)
        {
            this.alarmHandler  = alarmHandler;
            this.normalLogName = normalLogName;

            string errorMessage = "";

            if (ReadLocateControlConfig(ref errorMessage))
            {
                //ReadResetPointCSV();
                status = EnumControlStatus.Initial;
                InitailControlDriver();
            }
            else
            {
                WriteLog(1, "", errorMessage);
                SendAlarmCode(EnumMoveCommandControlErrorCode.LocateControl初始化失敗);
            }
        }
Ejemplo n.º 7
0
 public void ResetAlarm()
 {
     AlarmHandler.ResetAllAlarms();
     MipcControl.ResetMIPCAlarm();
     MoveControl.ResetAlarm();
 }
Ejemplo n.º 8
0
 public UpdateControlHandler(AlarmHandler alarmHandler, string normalLogName)
 {
     this.alarmHandler  = alarmHandler;
     this.normalLogName = normalLogName;
 }