Exemplo n.º 1
0
 public BTLogData(BTUnits units)
 {
     Units = units;
     StepStatus = new byte[15];
     VesselVolumeAvg = new UInt32[3];
     VesselFlowRate = new UInt32[3];
     Temperature = new decimal[9];
     HeatOutput = new byte[4];
     HeatSetpoint = new int[4];
 }
Exemplo n.º 2
0
        private static MiscellaneousAdditionTypeAddition[] GetMiscAddition(BTUnits units)
        {
            var miscAdditions = new MiscellaneousAdditionTypeAddition[1];
            miscAdditions[0] = new MiscellaneousAdditionTypeAddition
            {
                name = String.Empty,
                type = MiscellaneousBaseType.other,
                use = MiscellaneousBaseUse.boil,
                Item = NewMassType(0.0m, units == BTUnits.Metric),
                time = NewTimeType(0.0m, TimeUnitType.min)
            };

            return miscAdditions;
        }
Exemplo n.º 3
0
 private static HopAdditionTypeAddition NewHopAddition(int additionTime, BTUnits units)
 {
     return new HopAdditionTypeAddition
     {
         name = String.Empty,
         origin = String.Empty,
         alpha_acid_units = 0.0m,
         beta_acid_units = 0.00m,
         beta_acid_unitsSpecified = false,
         form = HopAdditionTypeAdditionForm.leaf,
         use = HopAdditionTypeAdditionUse.boil,
         amount = NewMassType(0.0m, units == BTUnits.Metric),
         time = NewTimeType(additionTime, TimeUnitType.min)
     };
 }
Exemplo n.º 4
0
        private static HopAdditionTypeAddition[] GetHopsAdditions(BTUnits units)
        {
            var hopAdditionList = new List<HopAdditionTypeAddition>
                                  	{
            NewHopAddition(9999, units),
            NewHopAddition(105, units),
            NewHopAddition(90, units),
            NewHopAddition(75, units),
            NewHopAddition(60, units),
            NewHopAddition(45, units),
            NewHopAddition(30, units),
            NewHopAddition(20, units),
            NewHopAddition(15, units),
            NewHopAddition(10, units),
            NewHopAddition(5, units),
            NewHopAddition(0, units)
            };

            return hopAdditionList.ToArray();
        }
Exemplo n.º 5
0
        private static MashStepType[] GetMashSteps(BTUnits units)
        {
            var mashSteps = new List<MashStepType>();

            foreach (var mashStepName in Enum.GetNames(typeof(MashStepID)))
            {
                var mashStep = new MashStepType
                {
                    name = mashStepName,
                    type = MashStepTypeType.infusion,
                    infuse_amount = NewVolumeType(0.0m, units == BTUnits.Metric),
                    step_temperature = NewTemperatureType(0.0m, units == BTUnits.Metric),
                    step_time = NewTimeType(0.0m, TimeUnitType.min),
                    ramp_time = NewTimeType(0.0m, TimeUnitType.min),
                    end_temperature = NewTemperatureType(0.0m, units == BTUnits.Metric),
                    description = String.Empty,
                    water_grain_ratio = 0.0m,
                    water_grain_ratioSpecified = mashStepName == MashStepID.DoughIn.ToString(),
                    decoction_amount = NewVolumeType(0, units == BTUnits.Metric),
                    infuse_temperature = NewTemperatureType(0, units == BTUnits.Metric),
                };
                mashSteps.Add(mashStep);
            }

            return mashSteps.ToArray();
        }
Exemplo n.º 6
0
        private static FermentableAdditionTypeAddition[] GetGrainBill(BTUnits units)
        {
            var grainBill = new FermentableAdditionTypeAddition[1];
            grainBill[0] = new FermentableAdditionTypeAddition
            {
                name = String.Empty,
                type = FermentableBaseType.grain,
                color = NewColorType(0, ColorUnitType.L),
                origin = String.Empty,
                supplier = String.Empty,
                amount = NewMassType(0, units == BTUnits.Metric),
                add_after_boil = false,
                add_after_boilSpecified = false
            };

            return grainBill;
        }
Exemplo n.º 7
0
 public BTCalcTemps(BTUnits units)
 {
     Units = units;
 }
Exemplo n.º 8
0
 /// <summary> Construct a BTRecipe </summary>
 /// 
 public BTRecipe(BTUnits units)
 {
     Units = units;
     Xml = new RecipeType();
     InitializeXml();
     _mashSteps = new SortedList<MashStepID, MashStepType>
     {
         {MashStepID.PreHeat, PreHeat},
         {MashStepID.DoughIn, DoughIn},
         {MashStepID.AcidRest, AcidRest},
         {MashStepID.ProteinRest, ProteinRest},
         {MashStepID.Sacch1Rest, Sacch1Rest},
         {MashStepID.Sacch2Rest, Sacch2Rest},
         {MashStepID.MashOut, MashOut}
     };
 }
Exemplo n.º 9
0
 public BTCalcVols(BTUnits units)
 {
     Units = units;
 }
Exemplo n.º 10
0
        private BTRecipe CreateTestRecipe(int slot, BTUnits units)
        {
            var recipe = new BTRecipe(units);
            recipe.Name = "NUnit Test Recipe";

            recipe.PreHeat.step_time.Value = 10;
            recipe.PreHeat.step_temperature.Value = 120;
            recipe.DoughIn.step_time.Value = 11;
            recipe.DoughIn.step_temperature.Value = 130;
            recipe.AcidRest.step_time.Value = 12;
            recipe.AcidRest.step_temperature.Value = 140;
            recipe.ProteinRest.step_time.Value = 13;
            recipe.ProteinRest.step_temperature.Value = 150;
            recipe.Sacch1Rest.step_time.Value = 14;
            recipe.Sacch1Rest.step_temperature.Value = 160;
            recipe.Sacch2Rest.step_time.Value = 15;
            recipe.Sacch2Rest.step_temperature.Value = 170;
            recipe.MashOut.step_time.Value = 16;
            recipe.MashOut.step_temperature.Value = 180;

            recipe.SpargeTemp.Value = 150;
            recipe.HLTSetpoint.Value = 121;
            recipe.MashHeatSource = BTVesselID.HLT;
            recipe.MashRatio = 1.05m;
            recipe.BatchVolume.Value = 65.5m;
            recipe.GrainWeight.Value = 2.34m;
            recipe.BoilTime.Value = 63;
            recipe.PitchTemp.Value = 144;
            recipe.Additions = 0x55;

            return recipe;
        }