private void WriteMrr(DateTime finishTime) { Mrr mrr = new Mrr(); mrr.FINISH_T = finishTime; mrr.RecordHeader.REC_LEN += 4; sfw.WriteRecord(mrr); }
public void TestMrr() { var mrr = new Mrr(); TestRoundTripEquality(mrr); mrr.ExecDescription = "Super Cool"; TestRoundTripEquality(mrr); }
//TODO: decide whether this should react to a special ErrorRecord, or EndOfStream // This boils down to whether spec violations should be repaired before or after validation. // Up to this point, repairs have not been the result of violations, so this is the first case. static IEnumerable <StdfRecord> RepairMissingMrrImpl(IEnumerable <StdfRecord> input) { Mrr mrr = null; foreach (var r in input) { if (r.GetType() == typeof(Mrr)) { mrr = (Mrr)r; } else if (r.GetType() == typeof(EndOfStreamRecord) && (mrr == null)) { yield return(new Mrr() { Synthesized = true, Offset = r.Offset }); } yield return(r); } }
public void DeleteMrr(Mrr mrr) { context.Entry(mrr).State = EntityState.Deleted; context.Mrrs.Remove(mrr); context.SaveChanges(); }
public void AddMrr(Mrr mrr) { FinishTime = mrr.FinishTime; }
public void Create(Mrr mrr) { context.Mrrs.Add(mrr); context.SaveChanges(); }
/// <summary> /// This is the method that is used to index a stream of records /// </summary> public override void IndexRecords(IEnumerable <StdfRecord> records) { _AllRecords = new List <StdfRecord>(); //extents for the current wafer and part Extents currentWaferExtents = null; Extents currentPartExtents = null; //tells us we're looking for something to confirm the extents are complete (helps us deal with multi-site testing) bool waferEnding = false; bool partsEnding = false; //ends the current wafer extents at the specified index void EndWafer(int endIndex) { currentWaferExtents.EndIndex = endIndex; currentWaferExtents.EndOffset = _AllRecords[endIndex].Offset; _WafersMap.AddExtents(currentWaferExtents); currentWaferExtents = null; waferEnding = false; } //ends the current part extents at the specified index void EndParts(int endIndex) { currentPartExtents.EndIndex = endIndex; currentPartExtents.EndOffset = _AllRecords[endIndex].Offset; _PartsMap.AddExtents(currentPartExtents); currentPartExtents = null; partsEnding = false; } //loop through the records, building the structure foreach (var r in records) { var index = _AllRecords.Count; //look for marker records //TODO: does all this checking/casting slow us down too much? if (r.GetType() == typeof(Mir)) { _Mir = (Mir)r; } else if (r.GetType() == typeof(Mrr)) { _Mrr = (Mrr)r; } else if (r.GetType() == typeof(Pcr)) { _Pcrs.Add((Pcr)r); } //if we think we're looking for the end of the wafers, and we hit something other than Wrr, we passed the end if (waferEnding && r.GetType() != typeof(Wrr)) { EndWafer(index - 1); } //if we think we're looking for the end of the parts, and we hit something other than Prr, we passed the end if (partsEnding && r.GetType() != typeof(Prr)) { EndParts(index - 1); } //when we hit Wrr or Prr, start looking for something else if (r.GetType() == typeof(Wrr)) { waferEnding = true; } else if (r.GetType() == typeof(Prr)) { partsEnding = true; } //if it's a new Pir/Wir, start new extents if (r.GetType() == typeof(Pir) && currentPartExtents == null) { currentPartExtents = new Extents { StartIndex = index, StartOffset = r.Offset }; } if (r.GetType() == typeof(Wir) && currentWaferExtents == null) { currentWaferExtents = new Extents { StartIndex = index, StartOffset = r.Offset }; } _AllRecords.Add(r); } var lastIndex = _AllRecords.Count - 1; //end any open wafers/parts at the last index if (waferEnding) { EndWafer(lastIndex); } if (partsEnding) { EndParts(lastIndex); } }