OraId, OraDesignation, RawDataId ... related : Fixed the case ORACLE_DB is not defined.
This commit is contained in:
parent
56275063f7
commit
c64e8e773f
@ -19,6 +19,7 @@ namespace TBF.Rig.Output
|
||||
TData = tData;
|
||||
RepNr = repNr;
|
||||
TestName = Common.Utils.GetTestName(tData.Name, tData.Repeats, repNr);
|
||||
#if ORACLE_DB
|
||||
Id = tData.OraId + repNr * tData.OraIdRepetMulti;
|
||||
if (string.IsNullOrEmpty(tData.OraDesignation))
|
||||
{
|
||||
@ -31,6 +32,10 @@ namespace TBF.Rig.Output
|
||||
? designations[repNr - 1] /// Name is from 'OraDesignation' parameter
|
||||
: Common.Utils.GetTestName(tData.Name, tData.Repeats, repNr); /// Name is from test name and repetition nr.
|
||||
}
|
||||
#else
|
||||
Id = 0;
|
||||
Designation = Common.Utils.GetTestName(tData.Name, tData.Repeats, repNr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ namespace TBF.Rig.Output
|
||||
// test.RawDataId + repetitionNr * test.RawDataIdRepetMulti
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
#if ORACLE_DB
|
||||
var trX = x as LUTestData;
|
||||
var trY = y as LUTestData;
|
||||
if (trX == null || trY == null) return 0;
|
||||
@ -33,6 +34,9 @@ namespace TBF.Rig.Output
|
||||
int valX = (idX > 0) ? int.MaxValue - idX : idX;
|
||||
int valY = (idY > 0) ? int.MaxValue - idY : idY;
|
||||
return order == SortOrder.Descending ? (valY - valX) : (valX - valY);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -658,6 +658,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
//
|
||||
// log.DebugFormat("Feature vector calculation end, save opto-file start: {0:HH:mm:ss.fff}", DateTime.Now);
|
||||
|
||||
#if ORACLE_DB
|
||||
if (test.RawDataId + repetitionNr * test.RawDataIdRepetMulti != 0)
|
||||
{
|
||||
string relativeDirectory = Path.Combine(StateMachine.CycleStartTimeStamp.ToString("yy"),
|
||||
@ -673,6 +674,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
startIx, endIx, optoData.Length, fileName);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
log.WarnFormat("IperlHead.Stop() startIx={0} endIx={1} len={2} no raw data file", startIx, endIx, optoData.Length);
|
||||
}
|
||||
@ -748,12 +750,17 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#'
|
||||
if (wmPosition.Length == 1) wmPosition = "0" + wmPosition;
|
||||
string cycleStartTime = StateMachine.CycleStartTimeStamp.ToString("HH_mm_ss");
|
||||
#if ORACLE_DB
|
||||
string[] designations = string.IsNullOrEmpty(test.RawDataDesignation) ? new string[0] : test.RawDataDesignation.Split(new char[] { '~' });
|
||||
int testId = test.RawDataId + repetitionNr * test.RawDataIdRepetMulti;
|
||||
string designation = string.IsNullOrEmpty(test.RawDataDesignation)
|
||||
? testId.ToString(testId > 0 ? "D2" : "D1") /// Name is generated from Id
|
||||
: (designations.Length > repetitionNr - 1) ? designations[repetitionNr - 1] /// Name is from 'RawDataDesignation' parameter
|
||||
: string.Format("{0}{1}", test.Name, repetitionNr); /// Name is form test name and repetition nr.
|
||||
: string.Format("{0}-{1}", designations[0], repetitionNr); /// Name is form test name and repetition nr.
|
||||
#else
|
||||
int testId = 0;
|
||||
string designation = (test.Repeats == 1) ? test.Name : string.Format("{0}-{1}", test.Name, repetitionNr);
|
||||
#endif
|
||||
///
|
||||
/// Return the file name
|
||||
///
|
||||
|
||||
Loading…
Reference in New Issue
Block a user