prepare for test ...
This commit is contained in:
@@ -855,6 +855,90 @@ class XC121SMCCycleHelper : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count Prev Peak Repetition ...
|
||||
*
|
||||
* @param barIndex: Integer ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int CountPrevPeakRepetition(
|
||||
int barIndex = 0//
|
||||
) {
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (barIndex < 0) {
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
int index = barIndex + 1;
|
||||
double value = mX121Helper.xpvHelper.GetPeak(index);
|
||||
index++;
|
||||
|
||||
//
|
||||
bool canContinue = true;
|
||||
while(canContinue) {
|
||||
//
|
||||
double iValue = mX121Helper.xpvHelper.GetPeak(index);
|
||||
|
||||
//
|
||||
canContinue = iValue == value;
|
||||
if (canContinue) {
|
||||
//
|
||||
index++;
|
||||
result++;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count Prev Vale Repetition ...
|
||||
*
|
||||
* @param barIndex: Integer ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int CountPrevValeRepetition(
|
||||
int barIndex = 0//
|
||||
) {
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
if (barIndex < 0) {
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
int index = barIndex + 1;
|
||||
double value = mX121Helper.xpvHelper.GetVale(index);
|
||||
index++;
|
||||
|
||||
//
|
||||
bool canContinue = true;
|
||||
while(canContinue) {
|
||||
//
|
||||
double iValue = mX121Helper.xpvHelper.GetVale(index);
|
||||
|
||||
//
|
||||
canContinue = iValue == value;
|
||||
if (canContinue) {
|
||||
//
|
||||
index++;
|
||||
result++;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Cycle State and Update it ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user