public abstract bool PerformSwathing(SimpleTriangle HeightInterpolator1, SimpleTriangle HeightInterpolator2, SimpleTriangle TimeInterpolator1, SimpleTriangle TimeInterpolator2, bool HalfPas, PassType passType, MachineSide machineSide);
/// <summary> /// DoProcessEpochContext is the method that does the actual processing /// of the epoch intervals into the appropriate data structures. Descendant /// classes must override this function. /// </summary> /// <param name="InterpolationFence"></param> /// <param name="machineSide"></param> public override void DoProcessEpochContext(Fence InterpolationFence, MachineSide machineSide) { (Swather ?? (Swather = CreateSwather(null))).InterpolationFence = InterpolationFence; // Primary e.g. blade, front drum Swather.PerformSwathing(FrontHeightInterpolator1, FrontHeightInterpolator2, FrontTimeInterpolator1, FrontTimeInterpolator2, HasRearAxleInThisEpoch, PassType.Front, machineSide); // rear positions if (HasRearAxleInThisEpoch) { Swather.PerformSwathing(RearHeightInterpolator1, RearHeightInterpolator2, RearTimeInterpolator1, RearTimeInterpolator2, HasRearAxleInThisEpoch, PassType.Rear, machineSide); } // track positions if (HasTrackInThisEpoch) { Swather.PerformSwathing(TrackHeightInterpolator1, TrackHeightInterpolator2, TrackTimeInterpolator1, TrackTimeInterpolator2, false, PassType.Track, machineSide); } // wheel positions if (HasWheelInThisEpoch) { Swather.PerformSwathing(WheelHeightInterpolator1, WheelHeightInterpolator2, WheelTimeInterpolator1, WheelTimeInterpolator2, false, PassType.Wheel, machineSide); } }
public override void DoProcessEpochContext(Fence InterpolationFence, MachineSide machineSide) { foreach (var s in _datalist) { var value = GetPropValue(this, s); if (value.GetType() == typeof(XYZ)) { _csv.WriteField(((XYZ)value).X); _csv.WriteField(((XYZ)value).Y); _csv.WriteField(((XYZ)value).Z); } //There should be a tidier way of doing this but this will do for now. else if (typeof(AccumulatedAttributes <>).Name.Equals(value.GetType().Name)) { var type = value.GetType().GetGenericArguments()?[0]; var instance = typeof(AccumulatedAttributes <>).MakeGenericType(type); var method = instance.GetMethod("GetLatest"); var latest = method?.Invoke(value, null); _csv.WriteField(latest); } else { _csv.WriteField(GetPropValue(this, s)); } } _csv.NextRecord(); _writer.Flush(); }
public byte SelectCCAValue(DateTime dateTime, PassType passType, MachineSide machineSide) { byte myResult = CellPassConsts.NullCCA; switch (passType) { case PassType.Front: switch (machineSide) { case MachineSide.Left: myResult = ICCCALeftFrontValues.GetValueAtDateTime(dateTime, CellPassConsts.NullCCA); break; case MachineSide.Right: myResult = ICCCARightFrontValues.GetValueAtDateTime(dateTime, CellPassConsts.NullCCA); break; } break; case PassType.Rear: switch (machineSide) { case MachineSide.Left: myResult = ICCCALeftRearValues.GetValueAtDateTime(dateTime, CellPassConsts.NullCCA); break; case MachineSide.Right: myResult = ICCCARightRearValues.GetValueAtDateTime(dateTime, CellPassConsts.NullCCA); break; } break; } if (myResult == CellPassConsts.NullCCA) { myResult = ICCCAValues.GetValueAtDateTime(dateTime, CellPassConsts.NullCCA); } return(myResult); }
/// <summary> /// DoProcessEpochContext is the method that does the actual processing /// of the epoch intervals into the appropriate data structures. Descendant /// classes must override this function. /// </summary> /// <param name="InterpolationFence"></param> /// <param name="machineSide"></param> public abstract void DoProcessEpochContext(Fence InterpolationFence, MachineSide machineSide);