int ImperxStream::SetPreAmpGain(int gain) { PvResult outcome; PvString value; switch(gain) { case -3: value = "minus3dB"; break; case 0: value = "zero_dB"; break; case 3: value = "plus3dB"; break; case 6: value = "plus6dB"; break; default: return -1; } outcome = lDeviceParams->SetEnumValue("PreAmpRaw",value); if (outcome.IsSuccess()) { return 0; } return -1; }
int ImperxStream::SetBlackLevel(int black) { PvResult outcome; if (black >= 0 && black <= 1023) { outcome = lDeviceParams->SetIntegerValue("BlackLevelRaw",black); if (outcome.IsSuccess()) { return 0; } } return -1; }
int ImperxStream::SetAnalogGain(int gain) { PvResult outcome; if (gain >= 0 && gain <= 1023) { outcome = lDeviceParams->SetIntegerValue("GainRaw",gain); if (outcome.IsSuccess()) { return 0; } } return -1; }
int ImperxStream::SetROIOffsetY(int y) { PvResult outcome; if (y >= 0 && y <= 1295) { outcome = lDeviceParams->SetIntegerValue("OffsetY", y); if (outcome.IsSuccess()) { return 0; } } return -1; }
int ImperxStream::SetROIOffsetX(int x) { PvResult outcome; if (x >= 0 && x <= 965) { outcome = lDeviceParams->SetIntegerValue("OffsetX", x); if (outcome.IsSuccess()) { return 0; } } return -1; }
int ImperxStream::SetROIWidth(int width) { PvResult outcome; if (width >= 8 && width <= 1296 && (width % 8) == 0) { outcome = lDeviceParams->SetIntegerValue("Width", width); if (outcome.IsSuccess()) { return 0; } } return -1; }
int ImperxStream::SetROIHeight(int height) { PvResult outcome; if (height >= 1 && height <= 966) { outcome = lDeviceParams->SetIntegerValue("Height", height); if (outcome.IsSuccess()) { return 0; } } return -1; }
int ImperxStream::SetExposure(int exposureTime) { PvResult outcome; if (exposureTime >= 5 && exposureTime <= 38221) { outcome = lDeviceParams->SetIntegerValue("ExposureTimeRaw",exposureTime); if (outcome.IsSuccess()) { return 0; } } return -1; }