public override void SetElevationMappingModeState(ElevationMappingMode Value) { base.SetElevationMappingModeState(Value); if (_DataTime != Consts.MIN_DATETIME_AS_UTC) { MachineTargetValueChangesAggregator.ElevationMappingModeStateEvents.PutValueAtDate(_DataTime, Value); } //else //{ //{$IFDEF DENSE_TAG_FILE_LOGGING} //SIGLogProcessMessage.Publish(Self, '_DataTime = 0 in SetElevationMappingModeState', 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(ElevationMappingMode x, ElevationMappingMode y) => x == y;
public void ElevationMappingModeTests_Import_ElevationMappingMode(string folder, string fileName, int count, ElevationMappingMode state) { // Convert a TAG file using a TAGFileConverter into a mini-site model var converter = DITagFileFixture.ReadTAGFile(folder, fileName); // Check the list is as expected, has one element and extract it converter.MachinesTargetValueChangesAggregator[0].ElevationMappingModeStateEvents.EventListType.Should().Be(ProductionEventType.ElevationMappingModeStateChange); converter.MachinesTargetValueChangesAggregator[0].ElevationMappingModeStateEvents.Count().Should().Be(count); var eventDate = converter.MachinesTargetValueChangesAggregator[0].ElevationMappingModeStateEvents.LastStateDate(); var eventValue = converter.MachinesTargetValueChangesAggregator[0].ElevationMappingModeStateEvents.LastStateValue(); // Check date of event falls within the date range of the TAG file. eventDate.Should().BeOnOrAfter(converter.Processor.FirstDataTime); eventDate.Should().BeOnOrBefore(converter.Processor.DataTime); // These test files only contain latest elevation mapping modes. eventValue.Should().Be(state); }
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); } }