コード例 #1
0
 public void SetEndTime(string paramText, string endTime, MashTun mashTun, Brew brew)
 {
     if (paramText.Equals("Protein Rest Time - Finish"))
     {
         MashTunProcessParameters paramToCheck  = MashTunProcessParameters.MashingInEndTime;
         MashTunProcessParameters paramToChange = MashTunProcessParameters.ProteinRestEndTime;
         IMashTunState            newState      = mashTun.SacRestState;
         SetProcessStepEndTime(endTime, mashTun, brew, paramToCheck, paramToChange, newState);
     }
 }
コード例 #2
0
 public void SetEndTime(string paramText, string endTime, MashTun mashTun, Brew brew)
 {
     if (paramText.Equals("Heating Time - Finish"))
     {
         MashTunProcessParameters paramToCheck  = MashTunProcessParameters.SacharificationRestEndTime;
         MashTunProcessParameters paramToChange = MashTunProcessParameters.HeatingUpEndTime;
         IMashTunState            newState      = mashTun.MashTransferToMashFilterState;
         SetProcessStepEndTime(endTime, mashTun, brew, paramToCheck, paramToChange, newState);
     }
 }
コード例 #3
0
        public MashTun()
        {
            _brew             = new Brew();
            _idleState        = new MashTunIdleState();
            _mashingInState   = new MashTunMashingInState();
            _proteinRestState = new MashTunProteinRestState();
            _sacRestState     = new MashTunSacRestState();
            _heatingUpState   = new MashTunHeatingUpState();
            _mashTransferToMashFilterState = new MashTunMashTransferToMashFilterState();

            _currentState = _idleState;
            //_currentState.InitBrew(this, _brew);
        }
コード例 #4
0
        public void SetEndTime(string paramText, string endTime, MashTun mashTun, Brew brew)
        {
            if (paramText.Equals("Mash in Time - Finish"))
            {
                MashTunProcessParameters paramToCheck  = MashTunProcessParameters.MashingInStartTime;
                MashTunProcessParameters paramToChange = MashTunProcessParameters.MashingInEndTime;
                IMashTunState            newState      = mashTun.ProteinRestState;
                SetProcessStepEndTime(endTime, mashTun, brew, paramToCheck, paramToChange, newState);

                string mashingInEndTime = brew.GetProcessParameterValue(ProcessEquipment.MashTun,
                                                                        MashTunProcessParameters.MashingInEndTime.ToString());
                Console.WriteLine("Mash Tun mashingInEndTime: " + mashingInEndTime);
            }
        }
コード例 #5
0
        protected void SetProcessStepEndTime(string endTime, MashTun mashTun, Brew brew,
                                             MashTunProcessParameters paramToCheck,
                                             MashTunProcessParameters paramToChange,
                                             IMashTunState newState)
        {
            string brandName         = brew.BrandName;
            string paramToCheckValue = brew.GetProcessParameterValue(ProcessEquipment.MashTun,
                                                                     paramToCheck.ToString());

            //Complete process step
            if (brandName.Length > 0 &&
                paramToCheckValue.Length > 0)
            {
                Brew   nBrew     = mashTun.Brew;
                string paramName = paramToChange.ToString();
                nBrew.SetProcessParameterValue(ProcessEquipment.MashTun, paramName, endTime);

                //Set new state
                //string newStateString =
                mashTun.SetState(newState);
                //Console.WriteLine("New state is: " + newStateString);
            }
        }