Example #1
0
 public CycleManager(XRayMonitor xRayMonitor, MotionMonitor motionMonitor, TurnableMonitor turnableMonitor, DetectorMonitor detectorMonitor, NotificationManager notificationManager)
 {
     this.mXRayMonitor         = xRayMonitor;
     this.mMotionMonitor       = motionMonitor;
     this.mTurnableMonitor     = turnableMonitor;
     this.mDetectorMonitor     = detectorMonitor;
     this.mNotificationManager = notificationManager;
     mState = CycleState.IDILE;
 }
Example #2
0
 public MoveMotorTask(int timeout, MotionMonitor motionMonitor, double rotX, double detY, double rotC, double detZ, double xRayZ) : base(timeout)
 {
     this.mMotionMonitor = motionMonitor;
     this.mRotXPos       = rotX;
     this.mDetYPos       = detY;
     this.mRotCPos       = rotC;
     this.mDetZPos       = detZ;
     this.mXRayZPos      = xRayZ;
     this.mType          = TaskType.MOVE_MOTOR;
 }
Example #3
0
 public MoveMotorByDeltaTask(int timeout, MotionMonitor motionMonitor, double rotX, double detY, double rotC, double detZ, double xRayZ) : base(timeout)
 {
     this.mMotionMonitor = motionMonitor;
     this.mRotXDelta     = rotX;
     this.mDetYDelta     = detY;
     this.mRotCDelta     = rotC;
     this.mDetZDelta     = detZ;
     this.mXRayZDelta    = xRayZ;
     this.mType          = TaskType.MOVE_MOTOR;
 }
Example #4
0
        public MainWindow()
        {
            InitializeComponent();
            machineControl.EventStart   += new EventStartHandler(machineControleEventStart);
            machineControl.EventExecute += new EventExecuteHandler(machineControlEventExecute);
            machineControl.EventStop    += new EventStopHandler(machineControleEventStop);

            ////Configure Notification Manager
            mNotificationManager = new NotificationManager();

            ////Detector Service
            this.mDetectorMonitor = this.ct3dControl.detectorControl;
            this.mDetectorMonitor.configureConn(1234, "127.0.0.1", 4321, "127.0.0.1");
            this.mDetectorMonitor.startService();

            ////XRay Service
            this.mXRayMonitor = this.ct3dControl.xRayControl;
            this.mXRayMonitor.configurePath(PathTool.bingPathFromAppDir("conf_deployment"), PathTool.bingPathFromAppDir("logs"));
            //this.mXRayMonitor.configurePath(PathTool.bingPathFromAppDir("conf"), PathTool.bingPathFromAppDir("logs"));
            this.mXRayMonitor.startService();

            ////Motion Service
            this.mMotionMonitor = this.ct3dControl.motionControl;
            this.mMotionMonitor.configurePort("COM5", 9600);
            this.mMotionMonitor.startService();

            ////Turnable Monitor
            this.mTurnableMonitor = this.ct3dControl.turntableControl;
            this.mMotionMonitor.RotCPositionChanged += this.mTurnableMonitor.setCurrentRotC;

            ////Create CycleManager
            mCycleManager = new CycleManager(this.mXRayMonitor, this.mMotionMonitor, this.mTurnableMonitor, this.mDetectorMonitor, this.mNotificationManager);
            mCycleManager.EventCycleInfo    += new EventCycleInfoHandler(notifyInfo);
            mCycleManager.EventCycleWarning += new EventCycleWarningHandler(notifyWarning);
            mCycleManager.EventCycleError   += new EventCycleErrorHandler(notifyError);

            Logger.Info("=====>XRay Config = conf_deployment");
            Logger.Info("=====>Motor Config = COM5");
        }
Example #5
0
 public StopMotorTask(int timeout, MotionMonitor motionMonitor) : base(timeout)
 {
     this.mType          = TaskType.STOP_MOTOR;
     this.mMotionMonitor = motionMonitor;
 }
Example #6
0
 public CheckMotorReadyTask(int timeout, MotionMonitor motionMonitor) : base(timeout)
 {
     this.mMotionMonitor = motionMonitor;
     this.mType          = TaskType.CHECK_MOTOR_READY;
 }