public void Initialize()
 {
     RobotManagementServiceRegister     = new RobotManagementService();
     DoorManagementServiceRegister      = new DoorManagementService();
     ProcedureManagementServiceRegister = new ProcedureManagementService();
     TrafficManagementServiceRegister   = new TrafficManagementService();
 }
示例#2
0
 public DoorConfigure(DoorManagementService doorManagementService, string cultureName = null)
 {
     InitializeComponent();
     ApplyLanguage(cultureName);
     this.doorManagementService = doorManagementService;
     DataContext = doorManagementService;
 }
        public void Initialize()
        {
            robotManagementService = new RobotManagementService(this.mainWindow.map);
            doorManagementService  = new DoorManagementService();
            DataReceive status = new DataReceive();

            // Test door
            ///   doorManagementService.DoorMezzamineUpNew.LampSetStateOn(DoorType.DOOR_FRONT);
            //while (true)
            //{
            //    doorManagementService.DoorMezzamineUpNew.LampOn(DoorType.DOOR_FRONT);
            //    doorManagementService.DoorMezzamineUpNew.LampOff(DoorType.DOOR_FRONT);
            //    doorManagementService.DoorMezzamineUpNew.OpenPress(DoorType.DOOR_FRONT);
            //    doorManagementService.DoorMezzamineUpNew.GetStatus(ref status, DoorType.DOOR_FRONT);
            //    doorManagementService.DoorMezzamineUpNew.ClosePress(DoorType.DOOR_FRONT);
            //    doorManagementService.DoorMezzamineUpNew.GetStatus(ref status, DoorType.DOOR_FRONT);
            //    doorManagementService.DoorMezzamineUpNew.OpenPress(DoorType.DOOR_BACK);
            //    doorManagementService.DoorMezzamineUpNew.GetStatus(ref status, DoorType.DOOR_BACK);
            //    doorManagementService.DoorMezzamineUpNew.ClosePress(DoorType.DOOR_BACK);
            //    doorManagementService.DoorMezzamineUpNew.GetStatus(ref status, DoorType.DOOR_BACK);

            //}
            // End

            procedureManagementService = new ProcedureManagementService();
            chargerService             = new ChargerManagementService();
            trafficService             = new TrafficManagementService();
            deviceRegistrationService  = new DeviceRegistrationService(12000);
            Global_Object.doorManagementServiceCtrl = doorManagementService;
            assigmentTaskService = new AssigmentTaskService();
            assigmentTaskService.RegistryService(robotManagementService);
            assigmentTaskService.RegistryService(procedureManagementService);
            assigmentTaskService.RegistryService(deviceRegistrationService.GetDeviceItemList());
            assigmentTaskService.RegistryService(trafficService);
            procedureManagementService.RegistryService(trafficService);
            procedureManagementService.RegistryService(robotManagementService);
            procedureManagementService.RegistryService(doorManagementService);
            procedureManagementService.RegistryService(chargerService);
            procedureManagementService.RegistryService(deviceRegistrationService);
            procedureManagementService.RegistryService(assigmentTaskService);


            robotManagementService.Registry(trafficService);
            // robotManagementService.TestRobotProceure();
            robotManagementService.Initialize();
            //robotManagementService.robot2test();

            deviceRegistrationService.listen();
            deviceRegistrationService.RegistryMainWindow(this.mainWindow);

            //assigmentTaskService.Start();
            MessageBox.Show("Bấm Start Để Bắt Đầu !");
            RobotMoving robotMoving = new RobotMoving(robotManagementService.RobotUnityRegistedList);

            robotMoving.Show();

            //assigmentTaskService.Start();
        }
 public ProcedureForkLiftToBuffer(RobotUnity robot, DoorManagementService doorservice, TrafficManagementService trafficService) : base(robot, doorservice, trafficService)
 {
     StateForkLift    = ForkLift.FORBUF_IDLE;
     resCmd           = ResponseCommand.RESPONSE_NONE;
     this.robot       = robot;
     this.doorservice = doorservice;
     this.Traffic     = trafficService;
     procedureCode    = ProcedureCode.PROC_CODE_FORKLIFT_TO_BUFFER;
 }
 // public override event Action<Object> ErrorProcedureHandler;
 public ProcedureForkLiftToMachine(RobotUnity robot, DoorManagementService doorservice, TrafficManagementService traffiicService) : base(robot)
 {
     StateForkLiftToMachine = ForkLiftToMachine.FORMACH_IDLE;
     resCmd           = ResponseCommand.RESPONSE_NONE;
     this.robot       = robot;
     this.doorservice = doorservice;
     //  door = doorservice.DoorMezzamineUp;
     this.Traffic  = traffiicService;
     procedureCode = ProcedureCode.PROC_CODE_FORKLIFT_TO_BUFFER;
 }
 // public override event Action<Object> ErrorProcedureHandler;
 public ProcedureReturnToGate(RobotUnity robot, DoorManagementService doorservice, TrafficManagementService traffiicService) : base(robot)
 {
     StateReturnToGate = ReturnToGate.RETGATE_IDLE;
     resCmd            = ResponseCommand.RESPONSE_NONE;
     this.robot        = robot;
     base.robot        = robot;
     // this.points = new DataReturnToGate();
     this.door     = doorservice;
     this.Traffic  = traffiicService;
     errorCode     = ErrorCode.RUN_OK;
     procedureCode = ProcedureCode.PROC_CODE_RETURN_TO_GATE;
 }
示例#7
0
 protected double DISTANCE_CHECk_BAYID = 6; //meter 8
 public TrafficProcedureService(RobotUnity robot, DoorManagementService doorservice, TrafficManagementService trafficService) : base(robot)
 {
     this.traffic     = trafficService;
     this.doorservice = doorservice;
     this.robot       = robot;
 }
示例#8
0
 public void RegistryService(DoorManagementService doorService)
 {
     this.doorService = doorService;
 }