Commit ef7d8f14 authored by Emmanuel Papillon's avatar Emmanuel Papillon

added output signal selection

parent 7c89bd33
Pipeline #33709 failed with stages
......@@ -78,7 +78,11 @@ namespace lima
enum A3_FanSpeed { Off=0, Low=1, On=2};
enum A3_PixelEncoding {Mono12=0, Mono12Packed = 1, Mono16=2, Mono32=3};
// trigger / gate level
enum A3_SignalLevel { Normal=0, Inverted=1};
// output signal
enum A3_OutputSignal { FireRow1=0, FireRowN=1, FireAll=2, FireAny=3 };
struct SdkFrameDim {
AT_64 width;
......@@ -164,6 +168,9 @@ namespace lima
void setTriggerLevel(A3_SignalLevel iLevel);
void getTriggerLevel(A3_SignalLevel &iLevel);
void setOutputSignal(A3_OutputSignal iSignal);
void getOutputSignal(A3_OutputSignal &oSignal) const;
void setAdcRate(A3_ReadOutRate iRate); // à exporter (avec le get)
void getAdcRate(A3_ReadOutRate &oRate) const;
void getAdcRateString(std::string &oRateString) const;
......
......@@ -41,6 +41,7 @@ namespace Andor3
enum A3_FanSpeed { Off=0, Low=1, On=2};
enum A3_PixelEncoding {Mono12=0, Mono12Packed = 1, Mono16=2, Mono32=3};
enum A3_SignalLevel {Normal=0, Inverted=1};
enum A3_OutputSignal {FireRow1=0, FireRowN=1, FireAll=2, FireAny=3};
Camera(const std::string& bitflow_path, int camera_number=0);
~Camera();
......@@ -99,6 +100,8 @@ namespace Andor3
void getGateLevel(A3_SignalLevel &iLevel /Out/ );
void setTriggerLevel(A3_SignalLevel iLevel /In/ );
void getTriggerLevel(A3_SignalLevel &iLevel /Out/ );
void setOutputSignal(A3_OutputSignal iSignal /In/ );
void getOutputSignal(A3_OutputSignal &oSignal /Out/ ) const;
void setAdcGain(A3_Gain iGain /In/ );
void getAdcGain(A3_Gain &oGain /Out/ ) const;
......
......@@ -94,6 +94,7 @@ namespace lima {
static const AT_WC* IOSelector = L"IOSelector";
static const AT_WC* IOInvert = L"IOInvert";
static const AT_WC* AuxiliaryOutSource = L"AuxiliaryOutSource";
// For future !!
// static const AT_WC* AccumulateCount = L"AccumulateCount";
......@@ -1486,6 +1487,32 @@ lima::Andor3::Camera::getTriggerLevel(A3_SignalLevel &iLevel)
iLevel = Normal;
}
void
lima::Andor3::Camera::setOutputSignal(A3_OutputSignal iSignal)
{
DEB_MEMBER_FUNCT();
if ( propImplemented(andor3::AuxiliaryOutSource) ) {
setEnumIndex(andor3::AuxiliaryOutSource, iSignal);
}
else {
DEB_TRACE() << "The camera has no fan speed setting... Do nothing !";
}
}
void
lima::Andor3::Camera::getOutputSignal(A3_OutputSignal &oSignal) const
{
DEB_MEMBER_FUNCT();
if ( propImplemented(andor3::AuxiliaryOutSource) ) {
int value;
getEnumIndex(andor3::AuxiliaryOutSource, &value);
oSignal = static_cast<A3_OutputSignal>(value);
}
else {
DEB_TRACE() << "The camera has no fan speed setting... Do nothing !";
}
}
//-----------------------------------------------------
// @brief set the temperature set-point // DONE
// @param temperature in centigrade
......
......@@ -98,6 +98,11 @@ class Andor3(PyTango.Device_4Impl):
self.__TriggerLevel = { 'NORMAL': _Andor3Camera.Normal,
'INVERTED': _Andor3Camera.Inverted,
}
self.__OutputSignal = { 'FIREROW1': _Andor3Camera.FireRow1,
'FIREROWN': _Andor3Camera.FireRowN,
'FIREALL': _Andor3Camera.FireAll,
'FIREANY': _Andor3Camera.FireAny,
}
self.__Attribute2FunctionBase = {'adc_gain': 'SimpleGain',
'adc_rate': 'AdcRate',
......@@ -115,6 +120,7 @@ class Andor3(PyTango.Device_4Impl):
'serial_number': 'SerialNumber',
'gate_level': 'GateLevel',
'trigger_level': 'TriggerLevel',
'output_signal': 'OutputSignal',
}
self.init_device()
......@@ -384,6 +390,16 @@ class Andor3Class(PyTango.DeviceClass):
'format': '',
'description': 'NORMAl or INVERTED'
}],
'output_signal':
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ_WRITE],
{
'label':'Output signal selection',
'unit': 'N/A',
'format': '',
'description': 'FireRow1, FireRowN, FireAny, FireAll',
}],
}
#------------------------------------------------------------------
......
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