private void AddLogWithData(Log log, LogIndexType indexType, int numOfRows, bool hasEmptyChannel = true) { DevKit.InitHeader(log, indexType); DevKit.InitDataMany(log, DevKit.Mnemonics(log), DevKit.Units(log), numOfRows, hasEmptyChannel: hasEmptyChannel); DevKit.AddAndAssert(log); }
private Log CreateLog(LogIndexType indexType, LogIndexDirection direction) { var log = new Log { IndexType = indexType, Direction = direction, LogCurveInfo = new List <LogCurveInfo>() }; if (indexType == LogIndexType.datetime) { log.IndexCurve = "TIME"; log.LogCurveInfo.Add(_logGenerator.CreateDateTimeLogCurveInfo(log.IndexCurve, "s")); } else { log.IndexCurve = "MD"; log.LogCurveInfo.Add(_logGenerator.CreateDoubleLogCurveInfo(log.IndexCurve, "m")); } log.LogCurveInfo.Add(_logGenerator.CreateDoubleLogCurveInfo("ROP", "m/h")); log.LogCurveInfo.Add(_logGenerator.CreateDoubleLogCurveInfo("GR", "gAPI")); return(log); }
public void AddLogWithData(Log log, LogIndexType indexType, int numRows, bool hasEmptyChannel) { InitHeader(log, indexType); InitDataMany(log, Mnemonics(log), Units(log), numRows, hasEmptyChannel: hasEmptyChannel); var response = Add <LogList, Log>(log); Assert.AreEqual((short)ErrorCodes.Success, response.Result); }
private void CreateAndUpdateLogData(Log log, LogIndexType indexType, GenericMeasure startIndex, int numOfRows, double factor = 1, bool hasEmptyChannel = true) { var update = DevKit.CreateLog(log.Uid, null, log.UidWell, null, log.UidWellbore, null); update.StartIndex = startIndex; DevKit.InitHeader(update, indexType); DevKit.InitDataMany(update, DevKit.Mnemonics(update), DevKit.Units(update), numOfRows, factor, hasEmptyChannel: hasEmptyChannel); DevKit.UpdateAndAssert(update); }
private Log CreateLogDataUpdate(Log log, LogIndexType indexType, GenericMeasure startIndex, int numOfRows, double factor = 1) { var update = CreateLog(log.Uid, null, log.UidWell, null, log.UidWellbore, null); update.StartIndex = startIndex; DevKit.InitHeader(update, indexType); DevKit.InitDataMany(update, DevKit.Mnemonics(update), DevKit.Units(update), numOfRows, factor); return(update); }
private void AddLogWithData(Log log, LogIndexType indexType, int numOfRows) { AddParents(); DevKit.InitHeader(log, indexType); DevKit.InitDataMany(log, DevKit.Mnemonics(log), DevKit.Units(log), numOfRows); var response = DevKit.Add <LogList, Log>(log); Assert.AreEqual((short)ErrorCodes.Success, response.Result); }
public void InitHeader(Log log, LogIndexType indexType, bool increasing = true) { log.IndexType = indexType; log.IndexCurve = new IndexCurve(indexType == LogIndexType.datetime ? "TIME" : "MD") { ColumnIndex = 1 }; log.Direction = increasing ? LogIndexDirection.increasing : LogIndexDirection.decreasing; log.LogCurveInfo = List <LogCurveInfo>(); log.LogCurveInfo.Add( new LogCurveInfo() { Uid = log.IndexCurve.Value, Mnemonic = log.IndexCurve.Value, TypeLogData = indexType == LogIndexType.datetime ? LogDataType.datetime : LogDataType.@double, Unit = indexType == LogIndexType.datetime ? "s" : "m", ColumnIndex = 1 }); log.LogCurveInfo.Add( new LogCurveInfo() { Uid = "ROP", Mnemonic = "ROP", TypeLogData = LogDataType.@double, Unit = "m/h", ColumnIndex = 2 }); log.LogCurveInfo.Add( new LogCurveInfo() { Uid = "GR", Mnemonic = "GR", TypeLogData = LogDataType.@double, Unit = "gAPI", ColumnIndex = 3 }); InitData(log, Mnemonics(log), Units(log)); }