private void CarOutFinish(MaintainLift mtx)
 {
     LogHelper.Log(logger: logger, LogLevel: LogLevel.Info, Class: nameof(MTLService), Device: SCAppConstants.DeviceName.DEVICE_NAME_MTx,
                   Data: $"Process CarOutFinish!",
                   XID: mtx.DeviceID);
     mtx.SetCarOutInterlock(false);
     if (mtx.DokingMaintainDevice != null &&
         mtx.DokingMaintainDevice is MaintainSpace)
     {
         mtx.DokingMaintainDevice.SetCarInMoving(false);
     }
 }
Exemple #2
0
        public (bool isSuccess, string result) processCarOutScenario(MaintainLift mtx, AVEHICLE preCarOutVh)
        {
            string pre_car_out_vh_id          = preCarOutVh.VEHICLE_ID;
            string pre_car_out_vh_ohtc_cmd_id = preCarOutVh.OHTC_CMD;
            string pre_car_out_vh_cur_adr_id  = preCarOutVh.CUR_ADR_ID;
            bool   isSuccess;
            string result = "OK";

            mtx.CancelCarOutRequest = false;
            mtx.CarOurSuccess       = false;
            mtx.SetCarOutInterlock(true);
            //isSuccess = VehicleService.doReservationVhToMaintainsBufferAddress(pre_car_out_vh_id, MTL_CAR_OUT_BUFFER_ADDRESS);
            isSuccess = VehicleService.doReservationVhToMaintainsBufferAddress(pre_car_out_vh_id, mtx.MTL_SYSTEM_OUT_ADDRESS);
            if (isSuccess && SCUtility.isEmpty(pre_car_out_vh_ohtc_cmd_id))
            {
                //在收到OHT的ID:132-命令結束後或者在變為AutoLocal後此時OHT沒有命令的話則會呼叫此Function來創建一個Transfer command,讓Vh移至移動至System out上
                if (SCUtility.isMatche(pre_car_out_vh_cur_adr_id, mtx.MTL_SYSTEM_OUT_ADDRESS))
                {
                    VehicleService.doAskVhToMaintainsAddress(pre_car_out_vh_id, mtx.MTL_ADDRESS);
                }
                else
                {
                    VehicleService.doAskVhToSystemOutAddress(pre_car_out_vh_id, mtx.MTL_SYSTEM_OUT_ADDRESS);
                }
            }
            if (isSuccess)
            {
                //carOutVhID = pre_car_out_vh_id;
                mtx.PreCarOutVhID = pre_car_out_vh_id;
                Task.Run(() => RegularUpdateRealTimeCarInfo(mtx, preCarOutVh));
            }
            else
            {
                mtx.SetCarOutInterlock(false);
                isSuccess = false;
                result    = $"Reservation vh to mtl fail.";
            }

            return(isSuccess, result);
        }
        private void CarOutStart(MaintainLift mtx)
        {
            LogHelper.Log(logger: logger, LogLevel: LogLevel.Info, Class: nameof(MTLService), Device: SCAppConstants.DeviceName.DEVICE_NAME_MTx,
                          Data: $"Process CarOutStart!",
                          XID: mtx.DeviceID);

            mtx.SetCarOutInterlock(true);
            if (mtx.DokingMaintainDevice != null &&
                mtx.DokingMaintainDevice is MaintainSpace)
            {
                //因為MTL的前方有DockingMTS,因此要觸發CAR IN INTERLOCK,通知將門放下
                mtx.DokingMaintainDevice.SetCarInMoving(true);
            }
        }