Commit eac72988 authored by claustre's avatar claustre

Plugin is fuly implement now, tests have been performed with the IKon-M

model 934 (USB) camera and under python.
parent 11b8f035
This diff is collapsed.
......@@ -24,151 +24,55 @@
#include "HwInterface.h"
#include "AndorCamera.h"
#include "AndorDetInfoCtrlObj.h"
#include "AndorSyncCtrlObj.h"
#include "AndorShutterCtrlObj.h"
#include "AndorBinCtrlObj.h"
#include "AndorRoiCtrlObj.h"
namespace lima
{
namespace Andor
{
class Interface;
/*******************************************************************
* \class DetInfoCtrlObj
* \brief Control object providing Andor detector info interface
*******************************************************************/
class DetInfoCtrlObj : public HwDetInfoCtrlObj
{
DEB_CLASS_NAMESPC(DebModCamera, "DetInfoCtrlObj", "Andor");
public:
DetInfoCtrlObj(Camera& cam);
virtual ~DetInfoCtrlObj();
virtual void getMaxImageSize(Size& max_image_size);
virtual void getDetectorImageSize(Size& det_image_size);
virtual void getDefImageType(ImageType& def_image_type);
virtual void getCurrImageType(ImageType& curr_image_type);
virtual void setCurrImageType(ImageType curr_image_type);
virtual void getPixelSize(double& pixel_size);
virtual void getDetectorType(std::string& det_type);
virtual void getDetectorModel(std::string& det_model);
virtual void registerMaxImageSizeCallback(HwMaxImageSizeCallback& cb);
virtual void unregisterMaxImageSizeCallback(HwMaxImageSizeCallback& cb);
private:
Camera& m_cam;
};
/*******************************************************************
* \class SyncCtrlObj
* \brief Control object providing Andor synchronization interface
*******************************************************************/
class SyncCtrlObj : public HwSyncCtrlObj
{
DEB_CLASS_NAMESPC(DebModCamera, "SyncCtrlObj", "Andor");
public:
SyncCtrlObj(Camera& cam);
virtual ~SyncCtrlObj();
virtual bool checkTrigMode(TrigMode trig_mode);
virtual void setTrigMode(TrigMode trig_mode);
virtual void getTrigMode(TrigMode& trig_mode);
virtual void setExpTime(double exp_time);
virtual void getExpTime(double& exp_time);
virtual void setLatTime(double lat_time);
virtual void getLatTime(double& lat_time);
virtual void setNbHwFrames(int nb_frames);
virtual void getNbHwFrames(int& nb_frames);
namespace Andor
{
class Interface;
virtual void getValidRanges(ValidRangesType& valid_ranges);
private:
Camera& m_cam;
};
/*******************************************************************
* \class RoiCtrlObj
* \brief Control object providing Andor Roi interface
*******************************************************************/
class RoiCtrlObj : public HwRoiCtrlObj
{
DEB_CLASS_NAMESPC(DebModCamera, "RoiCtrlObj", "Andor");
public:
RoiCtrlObj(Camera& cam);
virtual ~RoiCtrlObj();
virtual void setRoi(const Roi& set_roi);
virtual void getRoi(Roi& hw_roi);
virtual void checkRoi(const Roi& set_roi, Roi& hw_roi);
private:
Camera& m_cam;
};
/*******************************************************************
* \class BinCtrlObj
* \brief Control object providing Andor Bin interface
*******************************************************************/
class BinCtrlObj : public HwBinCtrlObj
{
public:
BinCtrlObj(Camera& cam);
virtual ~BinCtrlObj() {}
virtual void setBin(const Bin& bin);
virtual void getBin(Bin& bin);
//allow all binning
virtual void checkBin(Bin& bin);
private:
Camera& m_cam;
};
/*******************************************************************
* \class Interface
* \brief Andor hardware interface
*******************************************************************/
class Interface : public HwInterface
{
DEB_CLASS_NAMESPC(DebModCamera, "AndorInterface", "Andor");
public:
Interface(Camera& cam);
virtual ~Interface();
//- From HwInterface
virtual void getCapList(CapList&) const;
virtual void reset(ResetLevel reset_level);
virtual void prepareAcq();
virtual void startAcq();
virtual void stopAcq();
virtual void getStatus(StatusType& status);
virtual int getNbHwAcquiredFrames();
private:
Camera& m_cam;
CapList m_cap_list;
DetInfoCtrlObj m_det_info;
SyncCtrlObj m_sync;
BinCtrlObj m_bin;
RoiCtrlObj m_roi;
mutable Cond m_cond;
};
} // namespace Andor
class Interface : public HwInterface
{
DEB_CLASS_NAMESPC(DebModCamera, "AndorInterface", "Andor");
public:
Interface(Camera& cam);
virtual ~Interface();
//- From HwInterface
virtual void getCapList(CapList&) const;
virtual void reset(ResetLevel reset_level);
virtual void prepareAcq();
virtual void startAcq();
virtual void stopAcq();
virtual void getStatus(StatusType& status);
virtual int getNbHwAcquiredFrames();
private:
Camera& m_cam;
CapList m_cap_list;
DetInfoCtrlObj m_det_info;
SyncCtrlObj m_sync;
BinCtrlObj m_bin;
RoiCtrlObj m_roi;
ShutterCtrlObj m_shutter;
mutable Cond m_cond;
};
} // namespace Andor
} // namespace lima
#endif // ANDORINTERFACE_H
......@@ -13,6 +13,11 @@ namespace Andor
Ready, Exposure, Readout, Latency, Fault
};
enum ShutterMode{
FRAME,
MANUAL
};
Camera(const std::string& config_path,int camera_number=0);
~Camera();
......@@ -50,6 +55,15 @@ namespace Andor
void setBin(const Bin&);
void getBin(Bin& /Out/);
void setShutterOpenTime(double tm);
void getShutterOpenTime(double& tm /Out/);
void setShutterCloseTime(double tm);
void getShutterCloseTime(double& tm /Out/);
void setShutter(bool flag);
void getShutter(bool& flag /Out/);
void setShutterMode(ShutterMode mode);
void getShutterMode(ShutterMode& mode /Out/);
void getPixelSize(double& /Out/);
void getStatus(Andor::Camera::Status& status /Out/);
......@@ -65,10 +79,6 @@ namespace Andor
void getFastExtTrigger(bool& flag /Out/);
void setShutterLevel(int level);
void getShutterLevel(int& level /Out/);
void setShutterOpenTime(int tm);
void geShutterOpenTime(int& tm /Out/);
void setShutterCloseTime(int tm);
void geShutterCloseTime(int& tm /Out/);
void setTemperatureSP(int temp);
void getTemperature(int& temp /Out/);
void setCooler(bool flag);
......
This diff is collapsed.
This diff is collapsed.
andor-objs = AndorCamera.o AndorInterface.o
andor-objs = AndorCamera.o AndorInterface.o AndorDetInfoCtrlObj.o AndorSyncCtrlObj.o AndorShutterCtrlObj.o AndorBinCtrlObj.o AndorRoiCtrlObj.o
SRCS = $(andor-objs:.o=.cpp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment