Commit ab625de5 authored by Emmanuel Papillon's avatar Emmanuel Papillon
Browse files

add parsing of marana 4.2 model

add reading of pixel size from library
change trigger mode handling:
list of triggers read from sdk (no static enum)
internal trigger mode in lima unit (IntTrig, ...)
remove andor3 functions set/getTriggerMode : trigger mode
has to be set using lima standards set/getTrigMode
parent 00f52b4c
Pipeline #24296 failed with stages
in 1 minute and 35 seconds
...@@ -70,7 +70,8 @@ namespace lima ...@@ -70,7 +70,8 @@ namespace lima
// In the same order/index as 'BitDepth' // In the same order/index as 'BitDepth'
enum A3_BitDepth { b11 = 0, b16= 1 }; enum A3_BitDepth { b11 = 0, b16= 1 };
// The camera trigger mode (in the enum order) : // The camera trigger mode (in the enum order) :
enum A3_TriggerMode { Internal = 0, ExternalLevelTransition = 1, ExternalStart = 2, ExternalExposure = 3, Software = 4, Advanced = 5, External = 6 }; // enum A3_TriggerMode { Internal = 0, ExternalLevelTransition = 1, ExternalStart = 2, ExternalExposure = 3, Software = 4, Advanced = 5, External = 6 };
// The binning system of andor3 : // The binning system of andor3 :
enum A3_Binning { B1x1=0, B2x2=1, B3x3=2, B4x4=3, B8x8=4}; enum A3_Binning { B1x1=0, B2x2=1, B3x3=2, B4x4=3, B8x8=4};
// The fan speed // The fan speed
...@@ -167,8 +168,8 @@ namespace lima ...@@ -167,8 +168,8 @@ namespace lima
void getBitDepthString(std::string &oDepthString) const; void getBitDepthString(std::string &oDepthString) const;
void getPxEncoding(A3_PixelEncoding &oPxEncoding) const; void getPxEncoding(A3_PixelEncoding &oPxEncoding) const;
void getPxEncodingString(std::string &oPxEncoding) const; void getPxEncodingString(std::string &oPxEncoding) const;
void setTriggerMode(A3_TriggerMode iMode); // void setTriggerMode(A3_TriggerMode iMode);
void getTriggerMode(A3_TriggerMode &oMode) const; // void getTriggerMode(A3_TriggerMode &oMode) const;
void getTriggerModeString(std::string &oModeString) const; void getTriggerModeString(std::string &oModeString) const;
void setTemperatureSP(double temp); // à exporter (avec le get) void setTemperatureSP(double temp); // à exporter (avec le get)
void getTemperatureSP(double& temp) const; void getTemperatureSP(double& temp) const;
...@@ -220,6 +221,8 @@ namespace lima ...@@ -220,6 +221,8 @@ namespace lima
void _setStatus(Camera::Status iStatus, bool iForce); void _setStatus(Camera::Status iStatus, bool iForce);
private: private:
void initTrigMode();
// -- andor3 Lower level functions // -- andor3 Lower level functions
int printInfoForProp(const AT_WC * iPropName, A3_TypeInfo iPropType) const; int printInfoForProp(const AT_WC * iPropName, A3_TypeInfo iPropType) const;
bool propImplemented(const AT_WC * iPropName) const; bool propImplemented(const AT_WC * iPropName) const;
...@@ -294,12 +297,13 @@ namespace lima ...@@ -294,12 +297,13 @@ namespace lima
A3_ReadOutRate m_adc_rate; A3_ReadOutRate m_adc_rate;
A3_ShutterMode m_electronic_shutter_mode; A3_ShutterMode m_electronic_shutter_mode;
A3_BitDepth m_bit_depth; A3_BitDepth m_bit_depth;
A3_TriggerMode m_trig_mode;
bool m_cooler; bool m_cooler;
double m_temperature_sp; double m_temperature_sp;
bool m_temperature_control_available; bool m_temperature_control_available;
// std::map<TrigMode, int> m_trig_mode_maps; TrigMode m_trig_mode;
// A3_TriggerMode m_trig_mode;
std::map<TrigMode, int> m_trig_mode_map;
static int sAndorSDK3InittedCounter; static int sAndorSDK3InittedCounter;
......
...@@ -36,7 +36,7 @@ namespace Andor3 ...@@ -36,7 +36,7 @@ namespace Andor3
enum A3_ShutterMode { Rolling = 0, Global = 1 }; enum A3_ShutterMode { Rolling = 0, Global = 1 };
enum A3_ReadOutRate { MHz10 = 0, MHz100 = 1, MHz200 = 2, MHz280 = 3 }; enum A3_ReadOutRate { MHz10 = 0, MHz100 = 1, MHz200 = 2, MHz280 = 3 };
enum A3_BitDepth { b11 = 0, b16= 1 }; enum A3_BitDepth { b11 = 0, b16= 1 };
enum A3_TriggerMode { Internal = 0, ExternalLevelTransition = 1, ExternalStart = 2, ExternalExposure = 3, Software = 4, Advanced = 5, External = 6 }; // enum A3_TriggerMode { Internal = 0, ExternalLevelTransition = 1, ExternalStart = 2, ExternalExposure = 3, Software = 4, Advanced = 5, External = 6 };
enum A3_Binning { B1x1=0, B2x2=1, B3x3=2, B4x4=3, B8x8=4}; enum A3_Binning { B1x1=0, B2x2=1, B3x3=2, B4x4=3, B8x8=4};
enum A3_FanSpeed { Off=0, Low=1, On=2}; enum A3_FanSpeed { Off=0, Low=1, On=2};
enum A3_PixelEncoding {Mono12=0, Mono12Packed = 1, Mono16=2, Mono32=3}; enum A3_PixelEncoding {Mono12=0, Mono12Packed = 1, Mono16=2, Mono32=3};
...@@ -107,8 +107,8 @@ namespace Andor3 ...@@ -107,8 +107,8 @@ namespace Andor3
void getBitDepth(A3_BitDepth &oMode /Out/ ) const; void getBitDepth(A3_BitDepth &oMode /Out/ ) const;
void getBitDepthString(std::string &oDepthString /Out/ ) const; void getBitDepthString(std::string &oDepthString /Out/ ) const;
void getPxEncodingString(std::string &oPxEncoding /Out/ ) const; void getPxEncodingString(std::string &oPxEncoding /Out/ ) const;
void setTriggerMode(A3_TriggerMode iMode /In/ ); // void setTriggerMode(A3_TriggerMode iMode /In/ );
void getTriggerMode(A3_TriggerMode &oMode /Out/ ) const; // void getTriggerMode(A3_TriggerMode &oMode /Out/ ) const;
void getTriggerModeString(std::string &oModeString /Out/ ) const; void getTriggerModeString(std::string &oModeString /Out/ ) const;
void setTemperatureSP(double temp /In/ ); void setTemperatureSP(double temp /In/ );
void getTemperatureSP(double& temp /Out/ ) const; void getTemperatureSP(double& temp /Out/ ) const;
......
...@@ -73,6 +73,8 @@ namespace lima { ...@@ -73,6 +73,8 @@ namespace lima {
static const AT_WC* Overlap = L"Overlap"; static const AT_WC* Overlap = L"Overlap";
static const AT_WC* PixelEncoding = L"PixelEncoding"; static const AT_WC* PixelEncoding = L"PixelEncoding";
static const AT_WC* PixelReadoutRate = L"PixelReadoutRate"; static const AT_WC* PixelReadoutRate = L"PixelReadoutRate";
static const AT_WC* PixelHeight = L"PixelHeight";
static const AT_WC* PixelWidth = L"PixelWidth";
static const AT_WC* PreAmpGainControl = L"PreAmpGainControl"; static const AT_WC* PreAmpGainControl = L"PreAmpGainControl";
static const AT_WC* ReadoutTime = L"ReadoutTime"; static const AT_WC* ReadoutTime = L"ReadoutTime";
static const AT_WC* SensorCooling = L"SensorCooling"; static const AT_WC* SensorCooling = L"SensorCooling";
...@@ -168,7 +170,7 @@ m_simple_gain(b16_lh_gain), ...@@ -168,7 +170,7 @@ m_simple_gain(b16_lh_gain),
m_adc_rate(MHz100), m_adc_rate(MHz100),
m_electronic_shutter_mode(Rolling), m_electronic_shutter_mode(Rolling),
m_bit_depth(b16), m_bit_depth(b16),
m_trig_mode(Internal), m_trig_mode(IntTrig),
m_cooler(true), m_cooler(true),
m_temperature_sp(5.0), m_temperature_sp(5.0),
m_temperature_control_available(true), m_temperature_control_available(true),
...@@ -254,7 +256,9 @@ m_maximage_size_cb_active(false) ...@@ -254,7 +256,9 @@ m_maximage_size_cb_active(false)
if (! m_detector_model.compare(0, 7, "ZYLA5.5")) { if (! m_detector_model.compare(0, 7, "ZYLA5.5")) {
m_detector_type = std::string("Zyla-5.5"); m_detector_type = std::string("Zyla-5.5");
} }
if (! m_detector_model.compare(0, 12, "MARANA-4BV11")) {
m_detector_type = std::string("Marana-4.2");
}
if ( m_detector_model != "SIMCAM CMOS" ) { if ( m_detector_model != "SIMCAM CMOS" ) {
std::string the_serial, the_fw; std::string the_serial, the_fw;
...@@ -291,7 +295,14 @@ m_maximage_size_cb_active(false) ...@@ -291,7 +295,14 @@ m_maximage_size_cb_active(false)
"Cannot get detector Y size"); "Cannot get detector Y size");
m_detector_size= Size(static_cast<int>(xmax), static_cast<int>(ymax)); m_detector_size= Size(static_cast<int>(xmax), static_cast<int>(ymax));
// --- init trigger modes
initTrigMode();
// printInfoForProp(andor3::ElectronicShutteringMode, Enum);
// printInfoForProp(andor3::PixelReadoutRate, Enum);
// printInfoForProp(andor3::PixelEncoding, Enum);
// --- Initialise deeper parameters of the controller // --- Initialise deeper parameters of the controller
initialiseController(); initialiseController();
...@@ -451,7 +462,7 @@ lima::Andor3::Camera::prepareAcq() ...@@ -451,7 +462,7 @@ lima::Andor3::Camera::prepareAcq()
// Better to use continuous mode, smaller ring-buffer allocated by SDK. L.Claustre // Better to use continuous mode, smaller ring-buffer allocated by SDK. L.Claustre
// excepted if the trigger mode is IntTrigMult (e.i Software) // excepted if the trigger mode is IntTrigMult (e.i Software)
if (m_trig_mode == Software) if (m_trig_mode == IntTrigMult)
{ {
DEB_TRACE()<< "Software trigger ON, set CycleMode to Fixed mode"; DEB_TRACE()<< "Software trigger ON, set CycleMode to Fixed mode";
AT_64 nb_frames = static_cast<AT_64>(m_nb_frames_to_collect); AT_64 nb_frames = static_cast<AT_64>(m_nb_frames_to_collect);
...@@ -498,7 +509,7 @@ lima::Andor3::Camera::startAcq() ...@@ -498,7 +509,7 @@ lima::Andor3::Camera::startAcq()
sendCommand(andor3::AcquisitionStart); sendCommand(andor3::AcquisitionStart);
} }
if ( Software == m_trig_mode ) { if ( IntTrigMult == m_trig_mode ) {
// If we are in software trigger mode, the call to startAcq serves as the trigger : // If we are in software trigger mode, the call to startAcq serves as the trigger :
sendCommand(andor3::SoftwareTrigger); sendCommand(andor3::SoftwareTrigger);
} }
...@@ -614,86 +625,97 @@ lima::Andor3::Camera::getBufferCtrlObj() ...@@ -614,86 +625,97 @@ lima::Andor3::Camera::getBufferCtrlObj()
} }
//-- Synch control object //-- Synch control object
void
lima::Andor3::Camera::initTrigMode()
{
DEB_MEMBER_FUNCT();
AT_BOOL b_value;
int enum_count;
AT_WC s_value[1024];
std::string s_mode;
AT_GetEnumCount(m_camera_handle, andor3::TriggerMode, &enum_count);
for (int idx=0; enum_count != idx; ++idx) {
AT_GetEnumStringByIndex(m_camera_handle, andor3::TriggerMode, idx, s_value, 1024);
AT_IsEnumIndexImplemented(m_camera_handle, andor3::TriggerMode, idx, &b_value);
if (b_value) {
s_mode = WStringToString(s_value);
if ( s_mode == "Internal" ) {
m_trig_mode_map.emplace(IntTrig, idx);
DEB_TRACE() << "Found IntTrig mode" ;
} else if ( s_mode == "Software" ) {
m_trig_mode_map.emplace(IntTrigMult, idx);
DEB_TRACE() << "Found IntTrigMult mode" ;
} else if ( s_mode == "External" ) {
m_trig_mode_map.emplace(ExtTrigMult, idx);
DEB_TRACE() << "Found ExtTrigMult mode" ;
} else if ( s_mode == "External Start" ) {
m_trig_mode_map.emplace(ExtTrigSingle, idx);
DEB_TRACE() << "Found ExtTrigSingle mode" ;
} else if ( s_mode == "External Exposure" ) {
m_trig_mode_map.emplace(ExtGate, idx);
DEB_TRACE() << "Found ExtGate mode" ;
}
}
}
}
bool bool
lima::Andor3::Camera::checkTrigMode(TrigMode mode) lima::Andor3::Camera::checkTrigMode(TrigMode mode)
{ {
switch (mode) { std::map<TrigMode,int>::iterator it;
case IntTrig:
case IntTrigMult: it = m_trig_mode_map.find(mode);
case ExtTrigSingle: if (it != m_trig_mode_map.end())
case ExtTrigMult: return true;
case ExtGate: else
return true; return false;
break;
default:
return false;
break;
}
} }
void void
lima::Andor3::Camera::setTrigMode(TrigMode mode) lima::Andor3::Camera::setTrigMode(TrigMode mode)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
A3_TriggerMode the_trigger_mode; std::map<TrigMode,int>::iterator it;
switch (mode) { int i_setmode, i_getmode;
case IntTrig:
the_trigger_mode = Internal; if (m_real_camera) {
break; it = m_trig_mode_map.find(mode);
case IntTrigMult: if (it == m_trig_mode_map.end())
the_trigger_mode = Software; THROW_HW_ERROR(Error) << "The triggering mode " << mode
break; << " is NOT implemented in this SDK";
case ExtTrigSingle:
the_trigger_mode = ExternalStart; i_setmode = it->second;
break; setEnumIndex(andor3::TriggerMode, i_setmode);
case ExtTrigMult:
the_trigger_mode = External; getEnumIndex(andor3::TriggerMode, &i_getmode);
break; if ( i_setmode != i_getmode ) {
case ExtGate: DEB_ERROR() << "Proof-reading the trigger mode :"
the_trigger_mode = ExternalExposure; << "\n\tGot " << i_getmode << ", while requesting " << i_setmode;
break; for (it=m_trig_mode_map.begin(); it!=m_trig_mode_map.end(); ++it) {
if (i_getmode == it->second) {
case ExtStartStop: m_trig_mode = it->first;
case ExtTrigReadout: }
default: }
the_trigger_mode = Internal; } else {
THROW_HW_ERROR(Error) << "The triggering mode " << mode m_trig_mode = mode;
<< " is NOT implemented in this SDK"; }
break;
} }
setTriggerMode(the_trigger_mode); else {
setEnumString(andor3::TriggerMode, L"Advanced");
DEB_TRACE() << "SIMCAM - forcing trigger mode to Advanced";
m_trig_mode = mode;
}
DEB_TRACE() << "Trigger Mode is now : " << m_trig_mode;
} }
void void
lima::Andor3::Camera::getTrigMode(TrigMode& mode) lima::Andor3::Camera::getTrigMode(TrigMode& mode)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
A3_TriggerMode the_trigger_mode; mode = m_trig_mode;
getTriggerMode(the_trigger_mode);
switch (the_trigger_mode) {
case Internal:
mode = IntTrig;
break;
case Software:
mode = IntTrigMult;
break;
case ExternalStart:
mode = ExtTrigSingle;
break;
case External:
mode = ExtTrigMult;
break;
case ExternalExposure:
mode = ExtGate;
break;
default:
mode = IntTrig;
THROW_HW_ERROR(Error) << "The triggering mode of the SDK " << the_trigger_mode
<< " does not correspond to any mode of LIMA, returning " << mode;
break;
}
} }
void void
...@@ -825,7 +847,7 @@ lima::Andor3::Camera::checkRoi(const Roi& set_roi, Roi& hw_roi) ...@@ -825,7 +847,7 @@ lima::Andor3::Camera::checkRoi(const Roi& set_roi, Roi& hw_roi)
{2592, 304, 929, 1, 1, 1297, 1297}, {2592, 304, 929, 1, 1, 1297, 1297},
{ 240, 256, 953, 1169, 1177, 1289, 1297}, { 240, 256, 953, 1169, 1177, 1289, 1297},
{ 144, 128, 1017, 1217, 1225, 1289, 1297}, { 144, 128, 1017, 1217, 1225, 1289, 1297},
NULL // NULL
}; };
// Trying to take the smallest enclosing possible ROI (depending on the bit-depth of the image) : // Trying to take the smallest enclosing possible ROI (depending on the bit-depth of the image) :
...@@ -1116,7 +1138,8 @@ void ...@@ -1116,7 +1138,8 @@ void
lima::Andor3::Camera::getPixelSize(double& sizex, double& sizey) lima::Andor3::Camera::getPixelSize(double& sizex, double& sizey)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
sizex = sizey = 6.5; // in micron ? getFloat(andor3::PixelWidth, &sizex);
getFloat(andor3::PixelHeight, &sizey);
} }
void void
...@@ -1127,7 +1150,7 @@ lima::Andor3::Camera::getStatus(Camera::Status& status) ...@@ -1127,7 +1150,7 @@ lima::Andor3::Camera::getStatus(Camera::Status& status)
status = m_status; status = m_status;
//Check if the camera is not waiting for soft. trigger //Check if the camera is not waiting for soft. trigger
if (status == Camera::Readout && if (status == Camera::Readout &&
m_trig_mode == Software) m_trig_mode == IntTrigMult)
{ {
status = Camera::Ready; status = Camera::Ready;
} }
...@@ -1161,7 +1184,7 @@ lima::Andor3::Camera::initialiseController() ...@@ -1161,7 +1184,7 @@ lima::Andor3::Camera::initialiseController()
// Carefully crafting the order, since some are affecting others... // Carefully crafting the order, since some are affecting others...
setElectronicShutterMode(m_electronic_shutter_mode); setElectronicShutterMode(m_electronic_shutter_mode);
setTriggerMode(m_trig_mode); setTrigMode(m_trig_mode);
setSimpleGain(the_simple_gain); setSimpleGain(the_simple_gain);
setAdcRate(the_rate); setAdcRate(the_rate);
setBitDepth(the_bd); setBitDepth(the_bd);
...@@ -1393,52 +1416,19 @@ lima::Andor3::Camera::getPxEncoding(A3_PixelEncoding &oPxEncoding) const ...@@ -1393,52 +1416,19 @@ lima::Andor3::Camera::getPxEncoding(A3_PixelEncoding &oPxEncoding) const
oPxEncoding = static_cast<A3_PixelEncoding>(oPxEncoding); oPxEncoding = static_cast<A3_PixelEncoding>(oPxEncoding);
} }
/*!
@brief Setting the trigger mode of the camera through the SDK settings.
@param iMode : the mode to select
*/
void
lima::Andor3::Camera::setTriggerMode(A3_TriggerMode iMode)
{
DEB_MEMBER_FUNCT();
if ( m_real_camera ) {
int the_mode;
setEnumIndex(andor3::TriggerMode, static_cast<int>(iMode));
getEnumIndex(andor3::TriggerMode, &the_mode);
m_trig_mode = static_cast<A3_TriggerMode>(the_mode);
if ( m_trig_mode != iMode ) {
DEB_ERROR() << "Proof-reading the trigger mode :"
<< "\n\tGot " << m_trig_mode << " back,"
<< "\n\twhile requesting " << iMode;
}
}
else { // Simulated camera -> setting it forcibly to «Advanced»
int the_mode;
setEnumIndex(andor3::TriggerMode, 5);
getEnumIndex(andor3::TriggerMode, &the_mode);
m_trig_mode = static_cast<A3_TriggerMode>(the_mode);
DEB_TRACE() << "The SIMCAM has only one trigger-mode setting (Advanced), making sure that's what we are doing now";
}
}
/*!
@brief Getting the triggering mode the camera is in
@param oMode : the mode selected upon return
*/
void
lima::Andor3::Camera::getTriggerMode(A3_TriggerMode &oMode) const
{
DEB_MEMBER_FUNCT();
oMode = m_trig_mode;
}
void void
lima::Andor3::Camera::getTriggerModeString(std::string &oModeString) const lima::Andor3::Camera::getTriggerModeString(std::string &oModeString) const
{ {
AT_WC the_string[256]; AT_WC the_string[256];
getEnumStringByIndex(andor3::TriggerMode, m_trig_mode, the_string, 255); int i_trig;
oModeString = WStringToString(std::wstring(the_string)); if (m_real_camera) {
i_trig = m_trig_mode_map.at(m_trig_mode);
getEnumStringByIndex(andor3::TriggerMode, m_trig_mode, the_string, 255);
oModeString = WStringToString(std::wstring(the_string));
}
else {
oModeString = "Advanced";
}
} }
...@@ -2033,41 +2023,41 @@ lima::Andor3::Camera::printInfoForProp(const AT_WC * iPropName, A3_TypeInfo iPro ...@@ -2033,41 +2023,41 @@ lima::Andor3::Camera::printInfoForProp(const AT_WC * iPropName, A3_TypeInfo iPro
AT_BOOL b_writable; AT_BOOL b_writable;
AT_BOOL b_readable; AT_BOOL b_readable;
DEB_TRACE() << "Retrieving information on property named \"" << WStringToString(iPropName) << "\".\n"; DEB_ALWAYS() << "Retrieving information on property named \"" << WStringToString(iPropName) << "\".\n";
int ret_code; int ret_code;
// Implemented // Implemented
if ( AT_SUCCESS != (ret_code = AT_IsImplemented(m_camera_handle, iPropName, &b_exists)) ) { if ( AT_SUCCESS != (ret_code = AT_IsImplemented(m_camera_handle, iPropName, &b_exists)) ) {
DEB_TRACE() << "Error in printInfoForProp : " << error_code(ret_code); DEB_ALWAYS() << "Error in printInfoForProp : " << error_code(ret_code);
return i_err; return i_err;
} }
DEB_TRACE() << "\tIsImplemented = " << atBoolToString(b_exists); DEB_ALWAYS() << "\tIsImplemented = " << atBoolToString(b_exists);
if ( ! b_exists ) { if ( ! b_exists ) {
DEB_TRACE() << "No more information to query, since the feature does not \"exists\" for this camera/driver/SDK."; DEB_ALWAYS() << "No more information to query, since the feature does not \"exists\" for this camera/driver/SDK.";
return i_err; return i_err;
} }
// ReadOnly // ReadOnly
AT_IsReadOnly(m_camera_handle, iPropName, &b_readonly); AT_IsReadOnly(m_camera_handle, iPropName, &b_readonly);
DEB_TRACE() << "\tIsReadOnly = " << atBoolToString(b_readonly); DEB_ALWAYS() << "\tIsReadOnly = " << atBoolToString(b_readonly);
// Writable // Writable
AT_IsWritable(m_camera_handle, iPropName, &b_writable); AT_IsWritable(m_camera_handle, iPropName, &b_writable);
DEB_TRACE() << "\tIsWritable = " << atBoolToString(b_writable); DEB_ALWAYS() << "\tIsWritable = " << atBoolToString(b_writable);
// Readable // Readable
AT_IsReadable(m_camera_handle, iPropName, &b_readable); AT_IsReadable(m_camera_handle, iPropName, &b_readable);
DEB_TRACE() << "\tIsReadable = " << atBoolToString(b_readable); DEB_ALWAYS() << "\tIsReadable = " << atBoolToString(b_readable);
if ( ! b_readable ) { if ( ! b_readable ) {
DEB_TRACE() << "Since the property is not readable at this time, we will stop here."; DEB_ALWAYS() << "Since the property is not readable at this time, we will stop here.";
return i_err; return i_err;
} }
// Now getting the value itself : we absolutely need now to know the type of the feature : // Now getting the value itself : we absolutely need now to know the type of the feature :
if ( Camera::Unknown == iPropType ) { if ( Camera::Unknown == iPropType ) {
DEB_TRACE() << "Could not retrieve information on a property of unknown type !!\n" DEB_ALWAYS() << "Could not retrieve information on a property of unknown type !!\n"
<< "Returning error code!!"; << "Returning error code!!";
return -1; return -1;
} }
...@@ -2125,47 +2115,47 @@ lima::Andor3::Camera::printInfoForProp(const AT_WC * iPropName, A3_TypeInfo iPro ...@@ -2125,47 +2115,47 @@ lima::Andor3::Camera::printInfoForProp(const AT_WC * iPropName, A3_TypeInfo iPro
break; break;
case Camera::Enum: case Camera::Enum:
DEB_TRACE() << "\tFeature of type ENUM"; DEB_ALWAYS() << "\tFeature of type ENUM";
if ( AT_SUCCESS == (ret_code = AT_GetEnumIndex(m_camera_handle, iPropName, &enum_Value)) ) { if ( AT_SUCCESS == (ret_code = AT_GetEnumIndex(m_camera_handle, iPropName, &enum_Value)) ) {
DEB_TRACE() << "\tValue = (" << enum_Value << ")"; DEB_ALWAYS() << "\tValue = (" << enum_Value << ")";
if ( AT_SUCCESS == (ret_code = AT_GetEnumStringByIndex(m_camera_handle, iPropName, enum_Value, s_Value, 1024)) ) if ( AT_SUCCESS == (ret_code = AT_GetEnumStringByIndex(m_camera_handle, iPropName, enum_Value, s_Value, 1024)) )
DEB_TRACE() << " \"" << WStringToString(s_Value) << "\""; DEB_ALWAYS() << " \"" << WStringToString(s_Value) << "\"";
else else
DEB_TRACE() << "\tError message : " << error_code(ret_code); DEB_ALWAYS() << "\tError message : " << error_code(ret_code);
if ( AT_SUCCESS == (ret_code = AT_IsEnumIndexImplemented(m_camera_handle, iPropName, enum_Value, &b_Value)) ) if ( AT_SUCCESS == (ret_code = AT_IsEnumIndexImplemented(m_camera_handle, iPropName, enum_Value, &b_Value)) )
DEB_TRACE() << "; implemented = " << atBoolToString(b_Value); DEB_ALWAYS() << "; implemented = " << atBoolToString(b_Value);
else else
DEB_TRACE() << "\tError message : " << error_code(ret_code); DEB_ALWAYS() << "\tError message : " << error_code(ret_code);
if ( AT_SUCCESS == (ret_code = AT_IsEnumIndexAvailable(m_camera_handle, iPropName, enum_Value, &b_Value)) ) if ( AT_SUCCESS == (ret_code = AT_IsEnumIndexAvailable(m_camera_handle, iPropName, enum_Value, &b_Value)) )
DEB_TRACE() << "; available = " << atBoolToString(b_Value); DEB_ALWAYS() << "; available = " << atBoolToString(b_Value);
else else
DEB_TRACE() << "\tError message : " << error_code(ret_code); DEB_ALWAYS() << "\tError message : " << error_code(ret_code);
DEB_TRACE() << "."; DEB_ALWAYS() << ".";
} }
else else
DEB_TRACE() << "\tError message : " << error_code(ret_code); DEB_ALWAYS() << "\tError message : " << error_code(ret_code);
if ( AT_SUCCESS == (ret_code = AT_GetEnumCount(m_camera_handle, iPropName, &enum_Count)) ) { if ( AT_SUCCESS == (ret_code = AT_GetEnumCount(m_camera_handle, iPropName, &enum_Count)) ) {
DEB_TRACE() << "\tAvailable choices are (" << enum_Count << ") :"; DEB_ALWAYS() << "\tAvailable choices are (" << enum_Count << ") :";
for ( int i=0; enum_Count != i; ++i ) { for ( int i=0; enum_Count != i; ++i ) {
DEB_TRACE() << "\t\t(" << i << ")";