Commit 718534b5 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Export Camera::ApiGeneration (was APIGeneration)

parent 39bbb414
......@@ -63,11 +63,11 @@ namespace lima
public:
enum APIGeneration { Eiger1, Eiger2 };
enum ApiGeneration { Eiger1, Eiger2 };
enum Status { Ready, Initialising, Exposure, Readout, Fault };
enum CompressionType {LZ4,BSLZ4};
Camera(const std::string& detector_ip, APIGeneration api = Eiger1);
Camera(const std::string& detector_ip, ApiGeneration api = Eiger1);
~Camera();
void initialize();
......@@ -112,6 +112,8 @@ namespace lima
// void reset();
// -- Eiger specific
void getApiGeneration(ApiGeneration&);
void getTemperature(double&);
void getHumidity(double&);
......@@ -167,7 +169,7 @@ namespace lima
TrigMode m_trig_mode;
//- camera stuff
APIGeneration m_api;
ApiGeneration m_api;
std::string m_detector_model;
std::string m_detector_type;
unsigned int m_maxImageWidth, m_maxImageHeight;
......
......@@ -28,12 +28,12 @@ namespace Eiger
%End
public:
enum APIGeneration { Eiger1, Eiger2 };
enum ApiGeneration { Eiger1, Eiger2 };
enum Status { Ready, Initialising, Exposure, Readout, Fault };
enum CompressionType {LZ4,BSLZ4};
Camera(const std::string& detector_ip,
Eiger::Camera::APIGeneration api = Eiger::Camera::Eiger1);
Eiger::Camera::ApiGeneration api = Eiger::Camera::Eiger1);
~Camera();
void initialize();
......@@ -78,6 +78,8 @@ namespace Eiger
// void reset();
// -- Eiger specific
void getApiGeneration(ApiGeneration& /Out/);
void getTemperature(double& /Out/);
void getHumidity(double& /Out/);
......
......@@ -129,7 +129,7 @@ private:
/// Ctor
//-----------------------------------------------------------------------------
Camera::Camera(const std::string& detector_ip, ///< [in] Ip address of the detector server
APIGeneration api)
ApiGeneration api)
: m_api(api),
m_image_number(0),
m_latency_time(0.),
......@@ -747,6 +747,21 @@ void Camera::_acquisition_finished(bool ok)
if(!error_msg.empty())
DEB_ERROR() << error_msg;
}
//-----------------------------------------------------------------------------
/// Returns the API generation of the detector
/*!
@return temperature value
*/
//-----------------------------------------------------------------------------
void Camera::getApiGeneration(ApiGeneration& api)
{
DEB_MEMBER_FUNCT();
api = m_api;
DEB_RETURN() << DEB_VAR1(api);
}
//-----------------------------------------------------------------------------
/// Returns the temperature of the detector
/*!
......
......@@ -69,6 +69,8 @@ class Eiger(PyTango.Device_4Impl):
PyTango.Device_4Impl.__init__(self,cl,name)
self.init_device()
self.__ApiGeneration = {'Eiger1': EigerAcq.Camera.Eiger1,
'Eiger2': EigerAcq.Camera.Eiger2}
self.__CountrateCorrection = {'ON':True,
'OFF':False}
self.__FlatfieldCorrection = {'ON':True,
......@@ -163,6 +165,10 @@ class EigerClass(PyTango.DeviceClass):
# Attribute definitions
attr_list = {
'api_generation':
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ]],
'temperature':
[[PyTango.DevFloat,
PyTango.SCALAR,
......
Supports Markdown
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