public void Should_set_GCSGuidanceMode_From_AutomaticsType_value(AutomaticsType automaticsType, TGCSAutomaticsMode automaticsMode) { var filterResult = new FilterResult(filter: CreateFilter(automaticsType: automaticsType)); var result = RaptorConverters.ConvertFilter(filterResult); Assert.AreEqual(automaticsMode, result.GCSGuidanceMode); }
public override int GetHashCode() { unchecked { var hashCode = StartUtc.GetHashCode(); hashCode = (hashCode * 397) ^ EndUtc.GetHashCode(); hashCode = (hashCode * 397) ^ (DateRangeType != null ? DateRangeType.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (DesignUid != null ? DesignUid.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (DesignFileName != null ? DesignFileName.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (ContributingMachines != null ? ContributingMachines.GetListHashCode() : 397); hashCode = (hashCode * 397) ^ (OnMachineDesignId != null ? OnMachineDesignId.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (OnMachineDesignName != null ? OnMachineDesignName.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (ElevationType != null ? ElevationType.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (VibeStateOn != null ? VibeStateOn.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (PolygonUid != null ? PolygonUid.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (PolygonName != null ? PolygonName.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (PolygonLL != null ? PolygonLL.GetListHashCode() : 397); hashCode = (hashCode * 397) ^ (PolygonType != null ? PolygonType.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (ForwardDirection != null ? ForwardDirection.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (LayerNumber != null ? LayerNumber.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (AlignmentUid != null ? AlignmentUid.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (AlignmentFileName != null ? AlignmentFileName.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (StartStation != null ? StartStation.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (EndStation != null ? EndStation.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (LeftOffset != null ? LeftOffset.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (RightOffset != null ? RightOffset.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (AsAtDate != null ? AsAtDate.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (AutomaticsType != null ? AutomaticsType.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (TemperatureRangeMin != null ? TemperatureRangeMin.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (TemperatureRangeMax != null ? TemperatureRangeMax.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (PassCountRangeMin != null ? PassCountRangeMin.GetHashCode() : 397); hashCode = (hashCode * 397) ^ (PassCountRangeMax != null ? PassCountRangeMax.GetHashCode() : 397); return(hashCode); } }
protected override void SetAutomaticsMode(AutomaticsType Value) { base.SetAutomaticsMode(Value); if (_DataTime != Consts.MIN_DATETIME_AS_UTC) { MachineTargetValueChangesAggregator.MachineAutomaticsStateEvents.PutValueAtDate(_DataTime, Value); } //else //{ //{$IFDEF DENSE_TAG_FILE_LOGGING} //SIGLogProcessMessage.Publish(Self, '_DataTime = 0 in SetAutomaticsMode', slpmcDebug); //{$ENDIF} //} }
/// <summary> /// Serializes content of the cell from the writer /// </summary> public void FromBinary(IBinaryRawReader reader) { EventElevationMappingMode = (ElevationMappingMode)reader.ReadByte(); EventInAvoidZoneState = reader.ReadByte(); EventDesignNameID = reader.ReadInt(); EventVibrationState = (VibrationState)reader.ReadByte(); EventAutoVibrationState = (AutoVibrationState)reader.ReadByte(); EventMachineGear = (MachineGear)reader.ReadByte(); EventMachineRMVThreshold = reader.ReadShort(); EventMachineAutomatics = (AutomaticsType)reader.ReadByte(); PositioningTechnology = (PositioningTech)reader.ReadByte(); GPSTolerance = (ushort)reader.ReadInt(); GPSAccuracy = (GPSAccuracy)reader.ReadByte(); MapReset_PriorDate = DateTime.FromBinary(reader.ReadLong()); MapReset_DesignNameID = reader.ReadInt(); LayerID = (ushort)reader.ReadInt(); EventFlags = reader.ReadByte(); }
public void Clear() { EventDesignNameID = NoDesignNameID; EventVibrationState = VibrationState.Invalid; EventAutoVibrationState = AutoVibrationState.Unknown; EventFlags = 0; EventMachineGear = MachineGear.Neutral; EventMachineRMVThreshold = CellPassConsts.NullRMV; EventMachineAutomatics = AutomaticsType.Unknown; EventElevationMappingMode = ElevationMappingMode.LatestElevation; EventInAvoidZoneState = 0; MapReset_PriorDate = CellPassConsts.NullTime; MapReset_DesignNameID = NoDesignNameID; GPSAccuracy = GPSAccuracy.Unknown; GPSTolerance = CellPassConsts.NullGPSTolerance; PositioningTechnology = PositioningTech.Unknown; LayerID = NullLayerID; }
/// <summary> /// Assign the contents of one Cell Events instance to this instance /// </summary> /// <param name="source"></param> public void Assign(CellEvents source) { EventDesignNameID = source.EventDesignNameID; EventVibrationState = source.EventVibrationState; EventAutoVibrationState = source.EventAutoVibrationState; EventFlags = source.EventFlags; EventMachineGear = source.EventMachineGear; EventMachineRMVThreshold = source.EventMachineRMVThreshold; EventMachineAutomatics = source.EventMachineAutomatics; EventElevationMappingMode = source.EventElevationMappingMode; EventInAvoidZoneState = source.EventInAvoidZoneState; MapReset_PriorDate = source.MapReset_PriorDate; MapReset_DesignNameID = source.MapReset_DesignNameID; GPSAccuracy = source.GPSAccuracy; GPSTolerance = source.GPSTolerance; PositioningTechnology = source.PositioningTechnology; LayerID = source.LayerID; }
public static bool Equals(AutomaticsType x, AutomaticsType y) => x == y;
public void Initialise(IFilteredValuePopulationControl populationControl) { TrackingUseMachineRMVThreshold = false; TrackingOverrideRMVJumpThreshold = CellPassConsts.NullRMV; if (populationControl.WantsTargetCCVValues) { TargetCCV = CellPassConsts.NullCCV; TargetCCV_Tracking = new SiteModelMachineTargetValueTrackingState <short>(MachineTargetValues, ProductionEventType.TargetCCV); } if (populationControl.WantsTargetMDPValues) { TargetMDP = CellPassConsts.NullMDP; TargetMDP_Tracking = new SiteModelMachineTargetValueTrackingState <short>(MachineTargetValues, ProductionEventType.TargetMDP); } if (populationControl.WantsTargetCCAValues) { TargetCCA = CellPassConsts.NullCCA; TargetCCA_Tracking = new SiteModelMachineTargetValueTrackingState <byte>(MachineTargetValues, ProductionEventType.TargetCCA); } if (populationControl.WantsTargetPassCountValues) { TargetPassCount = 0; // kICNullPassCountValue; TargetPassCount_Tracking = new SiteModelMachineTargetValueTrackingState <ushort>(MachineTargetValues, ProductionEventType.TargetPassCount); } if (populationControl.WantsTargetLiftThicknessValues) { TargetLiftThickness = CellPassConsts.NullHeight; TargetLiftThickness_Tracking = new SiteModelMachineTargetValueTrackingState <float>(MachineTargetValues, ProductionEventType.TargetLiftThickness); } /* TODO map reset events not included * if (populationControl.WantsEventMapResetValues) * { * EventMapResetPriorDate = 0; * EventMapResetDesignID = kNoDesignNameID; * EventMapReset_Tracking.Initialise(); * } */ if (populationControl.WantsEventDesignNameValues) { EventDesignNameID = Consts.kNoDesignNameID; EventDesignNameID_Tracking = new SiteModelMachineTargetValueTrackingState <int>(MachineTargetValues, ProductionEventType.DesignChange); } if (populationControl.WantsEventVibrationStateValues) { EventVibrationState = VibrationState.Invalid; EventVibrationState_Tracking = new SiteModelMachineTargetValueTrackingState <VibrationState>(MachineTargetValues, ProductionEventType.VibrationStateChange); } if (populationControl.WantsEventAutoVibrationStateValues) { EventAutoVibrationState = AutoVibrationState.Unknown; EventAutoVibrationState_Tracking = new SiteModelMachineTargetValueTrackingState <AutoVibrationState>(MachineTargetValues, ProductionEventType.AutoVibrationStateChange); } if (populationControl.WantsEventElevationMappingModeValues) { ElevationMappingModeState = ElevationMappingMode.LatestElevation; ElevationMappingModeState_Tracking = new SiteModelMachineTargetValueTrackingState <ElevationMappingMode>(MachineTargetValues, ProductionEventType.ElevationMappingModeStateChange); } if (populationControl.WantsEventICFlagsValues) { EventICFlag = 0; EventICFlag_Tracking = new SiteModelMachineTargetValueTrackingState <byte>(MachineTargetValues, ProductionEventType.ICFlagsChange); } if (populationControl.WantsEventMachineGearValues) { EventMachineGear = MachineGear.Null; EventMachineGear_Tracking = new SiteModelMachineTargetValueTrackingState <MachineGear>(MachineTargetValues, ProductionEventType.MachineGearChange); } if (populationControl.WantsEventMachineCompactionRMVJumpThreshold) { EventMachineRMVThreshold = CellPassConsts.NullRMV; EventMachineRMVThreshold_Tracking = new SiteModelMachineTargetValueTrackingState <short>(MachineTargetValues, ProductionEventType.MachineRMVJumpValueChange); } if (populationControl.WantsEventMachineAutomaticsValues) { EventMachineAutomatics = AutomaticsType.Unknown; EventMachineAutomatics_Tracking = new SiteModelMachineTargetValueTrackingState <AutomaticsType>(MachineTargetValues, ProductionEventType.MachineAutomaticsChange); } if (populationControl.WantsEventGPSAccuracyValues) { GPSAccuracyAndTolerance = new GPSAccuracyAndTolerance(GPSAccuracy.Unknown, CellPassConsts.NullGPSTolerance); GPSAccuracyState_Tracking = new SiteModelMachineTargetValueTrackingState <GPSAccuracyAndTolerance>(MachineTargetValues, ProductionEventType.GPSAccuracyChange); } if (populationControl.WantsEventPositioningTechValues) { PositioningTechState = PositioningTech.Unknown; PositioningTechState_Tracking = new SiteModelMachineTargetValueTrackingState <PositioningTech>(MachineTargetValues, ProductionEventType.PositioningTech); } if (populationControl.WantsTempWarningLevelMinValues) { TempWarningLevelMin = CellPassConsts.NullMaterialTemperatureValue; TempWarningLevelMin_Tracking = new SiteModelMachineTargetValueTrackingState <ushort>(MachineTargetValues, ProductionEventType.TempWarningLevelMinChange); } if (populationControl.WantsTempWarningLevelMaxValues) { TempWarningLevelMax = CellPassConsts.NullMaterialTemperatureValue; TempWarningLevelMax_Tracking = new SiteModelMachineTargetValueTrackingState <ushort>(MachineTargetValues, ProductionEventType.TempWarningLevelMaxChange); } if (populationControl.WantsLayerIDValues) { EventLayerID = CellPassConsts.NullLayerID; EventLayerID_Tracking = new SiteModelMachineTargetValueTrackingState <ushort>(MachineTargetValues, ProductionEventType.LayerID); } }