Example #1
0
void CLSValueEditor::editImplementation()
{
	// Identify and apply the new value setpoint.

	AMNumber newValue = getValue();

	if (newValue.isValid())
		setValue(newValue);
}
Example #2
0
bool AMDetector::reading0D(const AMnDIndex &startIndex, const AMnDIndex &endIndex, double *outputValues) const {
    if(!checkValid(startIndex, endIndex))
        return false;

    if(startIndex != endIndex)
        return false;

    AMNumber retVal = reading(startIndex);
    if(!retVal.isValid())
        return false;

    *outputValues = double(retVal);
    return true;
}
Example #3
0
bool AMDetector::reading1D(const AMnDIndex &startIndex, const AMnDIndex &endIndex, double *outputValues) const {
    if(!checkValid(startIndex, endIndex))
        return false;

    if (endIndex.i() < startIndex.i())
        return false;

    for (int i = startIndex.i(); i <= endIndex.i(); i++) {

        AMNumber retVal = reading(i);

        if(!retVal.isValid())
            return false;

        outputValues[i] = double(retVal);
    }

    return true;
}
Example #4
0
bool AMDetector::reading2D(const AMnDIndex &startIndex, const AMnDIndex &endIndex, double *outputValues) const {
    if(!checkValid(startIndex, endIndex))
        return false;

    if (endIndex.i() < startIndex.i() || endIndex.j() < startIndex.j())
        return false;

    int iSize = size(0);

    for (int j = startIndex.j(); j <= endIndex.j(); j++) {

        for (int i = startIndex.i(); i <= endIndex.i(); i++) {

            AMNumber retVal = reading(AMnDIndex(i, j));

            if(!retVal.isValid())
                return false;

            outputValues[i+j*iSize] = double(retVal);
        }
    }

    return true;
}