public static void start(ArtificialIntelligenceInterface artificialIntelligenceInterface) { if (ConveyorBasicController.connected && Server.connected && RfidBasicController.connected) { ArtificialIntelligence.artificialIntelligenceInterface = artificialIntelligenceInterface; ConveyorBasicController.resetAll(); Goods.Clear(); GoodsHandleMethod.Clear(); taskCount = 0; stopWhenNoTask = false; for (int t = 0; t < ChQueue.Length; t++) { UploadCount[t] = 0; } for (int t = 0; t < Locker.Length; t++) { Locker[t] = new object(); } ConveyorBasicController.mrC(0); ConveyorCleverController.OnSenserTriggerOn[0] = onSenser0TriggerOn; ConveyorCleverController.onEveryWorkingUnit = onEveryWorkingUnit; ConveyorCleverController.OnOutputOn[(int)ConveyorOutputDevice.MainRollerClockwise] = onMainRollerClockwise; RfidCleverController.onDetectRfid = onDetectRfid; running = true; } else { if (!ConveyorBasicController.connected) { artificialIntelligenceInterface.onStartFailed("Conveyor connect fail"); } if (!Server.connected) { artificialIntelligenceInterface.onStartFailed("Server connect fail"); } if (!RfidBasicController.connected) { artificialIntelligenceInterface.onStartFailed("RFID reader connect fail"); } } }