public override MissionResult ReRun(CRecipeGroup recG, int stepID) { if (_IsByPass) { return(MissionResult.NORMAL); } throw new NotImplementedException(); }
public CRecipeGroup LoadRec(string address) { StreamReader sr = new StreamReader(this._RecipeAddress + address + ".txt"); int index = 0; List <string> ip = new List <string>(); while (!sr.EndOfStream) { // 每次讀取一行,直到檔尾 string line = sr.ReadLine(); // 讀取文字到 line 變數 ip.Add(line); //ip[index] = line; index += 1; if (index >= 21) { break; } } CRecipeGroup curData = new CRecipeGroup(ip); sr.Close(); return(curData); }
public MissionResult RunUnloader(int posId, bool isLeft) { //bool isLeft; //if (posId < 5) // isLeft = true; //else // isLeft = false; if (this._Unloader.Status != UnloaderStatus.HOLDING && !_UnloaderTask.IsCompleted) { return(MissionResult.ROBOTBUSY); } if (isLeft) { if (this.unloaderItemNum_left <= 0) { return(MissionResult.NOFRAME); } } else { if (this.unloaderItemNum_right <= 0) { return(MissionResult.NOFRAME); } } //還沒設定位置 string barcodeID; if (!this._RobotManager.IsRobotAllOk()) { return(MissionResult.ROBOTERROR); } if (isLeft) { barcodeID = this.unloaderItemID_left; } else { barcodeID = this.unloaderItemID_right; } CRecipeGroup recG = this._RecipeManager.getRecipeGroupByBarcodeID(barcodeID); if (recG != null) { if (isLeft) { this._Unloader.Status = UnloaderStatus.WORKING_LEFT; } else { this._Unloader.Status = UnloaderStatus.WORKING_RIGHT; } if (isLeft) { if (this.unloaderItemNum_left == 1) { this._AlarmManager.ShowFrameEmpty_Loader(isLeft); } this.unloaderItemNum_left -= 1; } else { if (this.unloaderItemNum_right == 1) { this._AlarmManager.ShowFrameEmpty_Loader(isLeft); } this.unloaderItemNum_right -= 1; } _UnloaderTask = new Task <MissionResult>(_Unloader.Run, (object)(recG.unloaderRecipes[posId])); _UnloaderTask.Start(); return(MissionResult.START); } else { return(MissionResult.NOPATH); } //var testing = new Task<int>(tt, (object)recG); //testing.Start(); //throw new NotImplementedException(); // Task<stationStatus> testing = Task.Factory.StartNew<stationStatus>(m_Loader.run, recG); }
public bool SaveRecipeGroup(string filePath) { curRecipeGroup = new CRecipeGroup(); throw new NotImplementedException(); //return curRecipeGroup.saveRecipeFromFile(baseAddress + fileName); }
public RecipeEditorManager() { curRecipeGroup = new CRecipeGroup(); }
//{ // throw new NotImplementedException(); //} public abstract MissionResult ReRun(CRecipeGroup recG, int stepID);