Commit 65b386b6 authored by Jerome Locatelli's avatar Jerome Locatelli
Browse files

mode 1D (missed commit)

parent 782644c3
...@@ -25,7 +25,7 @@ using namespace boost; ...@@ -25,7 +25,7 @@ using namespace boost;
namespace camera { namespace camera {
const std::string CameraSetting::TYPE = "Camerasetting"; const std::string CameraSetting::TYPE = "Camerasetting";
const std::string CameraSetting:: BINNING[5] = {"NONE", "2048*2048","1024*1024","NONE","512*512"}; const std::string CameraSetting:: BINNING[5] = {"NONE", "1*1","2*2","NONE","4*4"};
const std::string CameraSetting:: MODE[5] = {"ND", "Single","ND","Multi","ND"}; const std::string CameraSetting:: MODE[5] = {"ND", "Single","ND","Multi","ND"};
CameraSetting::CameraSetting(const string& name) : CameraSetting::CameraSetting(const string& name) :
...@@ -33,14 +33,19 @@ CameraSetting::CameraSetting(const string& name) : ...@@ -33,14 +33,19 @@ CameraSetting::CameraSetting(const string& name) :
setFamily(family::ACQUISITION, family::SETTING); setFamily(family::ACQUISITION, family::SETTING);
binning.init(this, SAVE , "actualBinning", "wantedBinning"); hbinning.init(this, SAVE , "actualhBinning", "wantedhBinning");
hflip.init(this, SAVE, "hflip"); vbinning.init(this, SAVE , "actualvBinning", "wantedvBinning");
vflip.init(this, SAVE, "vflip"); // hflip.init(this, SAVE, "hflip");
rotate.init(this, SAVE, "rotate"); // vflip.init(this, SAVE, "vflip");
// rotate.init(this, SAVE, "rotate");
mode.init(this, SAVE, "actualmode", "wantedmode"); mode.init(this, SAVE, "actualmode", "wantedmode");
nbKine.init(this, SAVE, "nbKine"); nbKine.init(this, SAVE, "nbKine");
kineTime.init(this, SAVE, "kineTime"); kineTime.init(this, SAVE, "kineTime");
stringbinning.init(this, NOSAVE| SPY, "actualstringbin", "wantedstringbin", "Binn"); modeFVB.init(this, SAVE, "modeFVB");
stringvbinning.init(this, NOSAVE| SPY, "actualstringvbin", "wantedstringvbin", "vBinn");
stringhbinning.init(this, NOSAVE| SPY, "actualstringhbin", "wantedstringhbin", "hBinn");
stringmode.init(this, NOSAVE| SPY, "actualstringmode", "wantedstringmode", "Frame"); stringmode.init(this, NOSAVE| SPY, "actualstringmode", "wantedstringmode", "Frame");
temperature.init(this, SAVE| SPY, "actualtemp", "wantedtemp", "Temp"); temperature.init(this, SAVE| SPY, "actualtemp", "wantedtemp", "Temp");
temperature.setUnit("~degree"); temperature.setUnit("~degree");
...@@ -62,62 +67,83 @@ CameraSetting::~CameraSetting() { ...@@ -62,62 +67,83 @@ CameraSetting::~CameraSetting() {
} }
void CameraSetting::postConfiguration() { void CameraSetting::postConfiguration() {
hbinning=m_CamDriver->hbind();
//stringhbinning=BINNING[hbinning()];
vbinning=m_CamDriver->vbind();
//stringvbinning=BINNING[vbinning()];
binning=m_CamDriver->bind();
mode=m_CamDriver->acqmode(); mode=m_CamDriver->acqmode();
temperature=m_CamDriver->actualTemperature(); temperature=m_CamDriver->actualTemperature();
stringbinning=BINNING[binning()]; //stringmode=MODE[mode()];
stringmode=MODE[mode()];
registerRefresher(binning, &CameraSetting::refreshBinning, this); registerRefresher(hbinning, &CameraSetting::refreshBinning, this);
registerRefresher(vbinning, &CameraSetting::refreshBinning, this);
registerRefresher(mode, &CameraSetting::refreshMode, this); registerRefresher(mode, &CameraSetting::refreshMode, this);
registerUpdater(m_CamDriver->bind, &CameraSetting::updateBinning, this); registerUpdater(m_CamDriver->hbind, &CameraSetting::updateBinning, this);
registerUpdater(m_CamDriver->vbind, &CameraSetting::updateBinning, this);
registerUpdater(m_CamDriver->acqmode, &CameraSetting::updateMode, this); registerUpdater(m_CamDriver->acqmode, &CameraSetting::updateMode, this);
registerUpdater(m_CamDriver->actualTemperature, &CameraSetting::updateTemperature, this); registerUpdater(m_CamDriver->actualTemperature, &CameraSetting::updateTemperature, this);
} }
void CameraSetting::start() { void CameraSetting::start() {
// Test speed BOB
//hbinning.setpoint = 1;
//vbinning.setpoint = 2088;
if (modeFVB() == true) {
hbinning.setpoint = 1;
vbinning.setpoint = 2088;
}else {
hbinning.setpoint = 1;
vbinning.setpoint = 1;
}
int hvalue = hbinning.setpoint();
m_CamDriver->hbind = hvalue;
int vvalue = vbinning.setpoint();
m_CamDriver->vbind = vvalue;
int value=binning.setpoint(); m_CamDriver->acqmode = mode.setpoint();
m_CamDriver->bind = value; // m_CamDriver->hflip = hflip();
m_CamDriver->acqmode=mode.setpoint(); // m_CamDriver->vflip = vflip();
m_CamDriver->hflip = hflip();
m_CamDriver->vflip = vflip();
m_CamDriver->nbSlicesAcq = nbKine(); m_CamDriver->nbSlicesAcq = nbKine();
m_CamDriver->modeFVB = modeFVB();
//m_CamDriver->time = kineTime(); //m_CamDriver->time = kineTime();
if (value!=0){ if ((vvalue != 0) || (hvalue != 0)) {
if (modeFVB() == false) {
cout << "modeFVB == false hvalue " << hvalue << endl;
cout << "modeFVB == false vvalue " << vvalue << endl;
detectorController->detSize=(MAX_XSIZE/value *MAX_YSIZE/value); detectorController->detSize = (MAX_XSIZE / hvalue * MAX_YSIZE
/ vvalue);
//detectorController->detSize=(MAX_XSIZE *MAX_YSIZE); //detectorController->detSize=(MAX_XSIZE *MAX_YSIZE);
detectorElement->xSize=(MAX_XSIZE/value); detectorElement->xSize = (MAX_XSIZE / hvalue);
detectorElement->ySize=(MAX_YSIZE/value); detectorElement->ySize = (MAX_YSIZE / vvalue);
} else {
cout << "modeFVB == true " << endl;
detectorController->detSize = (2088);
detectorElement->xSize = (2088);
detectorElement->ySize = (1);
detectorElement->wSize = (1);
} }
if (mode()==3){ }
if (value!=0){
if (mode() == 3) {
if ((vvalue != 0) || (hvalue != 0)) {
detectorElement->wSize=nbKine(); detectorElement->wSize = nbKine();
detectorController->detSize=(MAX_XSIZE/value *MAX_YSIZE/value)*nbKine(); detectorController->detSize = (MAX_XSIZE / hvalue * MAX_YSIZE
detectorController->wSize=nbKine(); / vvalue) * nbKine();
detectorController->wSize = nbKine();
} }
} }
m_CamDriver->execute("writeParam"); m_CamDriver->execute("writeParam");
} }
...@@ -132,8 +158,10 @@ void CameraSetting::refreshMode(int32 value) { ...@@ -132,8 +158,10 @@ void CameraSetting::refreshMode(int32 value) {
} }
void CameraSetting::updateBinning() { void CameraSetting::updateBinning() {
binning=m_CamDriver->bind(); // hbinning=m_CamDriver->hbind();
stringbinning=BINNING[binning()]; // stringhbinning=BINNING[hbinning()];
// vbinning=m_CamDriver->vbind();
// stringvbinning=BINNING[vbinning()];
} }
......
...@@ -71,25 +71,33 @@ public: ...@@ -71,25 +71,33 @@ public:
void updateBinning(); void updateBinning();
void updateMode(); void updateMode();
void updateTemperature(); void updateTemperature();
//
// Property<int32> hflip;
// Property<int32> vflip;
// Property<int32> rotate;
Property<int32> hflip;
Property<int32> vflip;
Property<int32> rotate;
Property<int32, SETPOINT> mode; Property<int32, SETPOINT> mode;
Property<float64> kineTime; Property<float64> kineTime;
Property<int32> nbKine; Property<int32> nbKine;
Property<bool > modeFVB;
Property<int32, SETPOINT> temperature; Property<int32, SETPOINT> temperature;
Property<string, SETPOINT> stringbinning; Property<string, SETPOINT> stringhbinning;
Property<string, SETPOINT> stringvbinning;
Property<string, SETPOINT> stringmode; Property<string, SETPOINT> stringmode;
Property<int32, SETPOINT> binning; Property<int32, SETPOINT> hbinning;
Property<int32, SETPOINT> vbinning;
DriverPtr<ikon::IKonDriver> m_CamDriver; DriverPtr<ikon::IKonDriver> m_CamDriver;
ControllerPtr<acquisition::DetectorElement> detectorElement; ControllerPtr<acquisition::DetectorElement> detectorElement;
ControllerPtr<acquisition::DetectorController> detectorController; ControllerPtr<acquisition::DetectorController> detectorController;
#define MAX_XSIZE 2048 #define MAX_XSIZE 2048
#define MAX_YSIZE 2048 #define MAX_YSIZE 2088
#define MAX_TOTALSIZE 4194304 #define MAX_TOTALSIZE 4276224
}; };
......
...@@ -6,13 +6,14 @@ Camerasetting.wanted_time=Time ...@@ -6,13 +6,14 @@ Camerasetting.wanted_time=Time
Camerasetting.actual_time=Time Camerasetting.actual_time=Time
Camerasetting.wanted_kine=Nb Frame Camerasetting.wanted_kine=Nb Frame
Camerasetting.bind=Binning Camerasetting.vbind=VBinning
Camerasetting.hbind=HBinning
# Mode combo # Mode combo
Camerasetting.2048Label=2048*2048 Camerasetting.2048Label=1*1
Camerasetting.2048Value=1 Camerasetting.2048Value=1
Camerasetting.1024Label=1024*1024 Camerasetting.1024Label=2*2
Camerasetting.1024Value=2 Camerasetting.1024Value=2
Camerasetting.512Label=512*512 Camerasetting.512Label=4*4
Camerasetting.512Value=4 Camerasetting.512Value=4
Camerasetting.orientation=Orientation Camerasetting.orientation=Orientation
...@@ -41,7 +42,9 @@ Camerasetting.CountValue=1 ...@@ -41,7 +42,9 @@ Camerasetting.CountValue=1
Camerasetting.KineLabel=Multi Camerasetting.KineLabel=Multi
Camerasetting.KineValue=3 Camerasetting.KineValue=3
Camerasetting.FVBPrefix= Full Vertical Binning
Camerasetting.modeFVBCheckedValue=true
Camerasetting.modeFVBUncheckedValue=false
Camerasetting.wanted_temperature=Wanted Temp Camerasetting.wanted_temperature=Wanted Temp
Camerasetting.actual_temperature=Actual Temp Camerasetting.actual_temperature=Actual Temp
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<property_switcher role="Camerasetting1" property="wantedmode" <property_switcher role="Camerasetting1" property="wantedmode"
switcher_key="modeSwitcher" /> switcher_key="modeSwitcher" />
<number_of_lines nb_lines="2" /> <number_of_lines nb_lines="2" />
<combo role="Camerasetting1" property="wantedBinning" prefix="Camerasetting.bindPrefix" <combo role="Camerasetting1" property="wantedhBinning" prefix="Camerasetting.bindPrefix"
valuesAndLabels="Camerasetting.2048,Camerasetting.1024,Camerasetting.512" />
<combo role="Camerasetting1" property="wantedvBinning" prefix="Camerasetting.bindPrefix"
valuesAndLabels="Camerasetting.2048,Camerasetting.1024,Camerasetting.512" /> valuesAndLabels="Camerasetting.2048,Camerasetting.1024,Camerasetting.512" />
<combo role="Camerasetting1" property="wantedmode" prefix="Camerasetting.modePrefix" <combo role="Camerasetting1" property="wantedmode" prefix="Camerasetting.modePrefix"
valuesAndLabels="Camerasetting.Count,Camerasetting.Kine" /> valuesAndLabels="Camerasetting.Count,Camerasetting.Kine" />
......
...@@ -2,16 +2,24 @@ ...@@ -2,16 +2,24 @@
<controller type="Camerasetting"> <controller type="Camerasetting">
<property name="wantedBinning" type="long"> <property name="wantedvBinning" type="long">
</property> </property>
<property name="actualBinning" type="long">
</property> <property name="actualvBinning" type="long">
<property name="hflip" type="long">
</property> </property>
<property name="vflip" type="long">
<property name="wantedhBinning" type="long">
</property> </property>
<property name="rotate" type="long">
<property name="actualhBinning" type="long">
</property> </property>
<!-- <property name="hflip" type="long"> -->
<!-- </property> -->
<!-- <property name="vflip" type="long"> -->
<!-- </property> -->
<!-- <property name="rotate" type="long"> -->
<!-- </property> -->
<property name="actualmode" type="long"> <property name="actualmode" type="long">
</property> </property>
<property name="wantedmode" type="long"> <property name="wantedmode" type="long">
...@@ -23,5 +31,7 @@ ...@@ -23,5 +31,7 @@
<property name="kineTime" type="double"> <property name="kineTime" type="double">
</property> </property>
<property name="modeFVB" type="boolean">
</property>
</controller> </controller>
<plugin> <plugin>
<controller type="Camerasetting" role="Camerasetting1" /> <controller type="Camerasetting" role="Camerasetting1" />
<property_switcher role="Camerasetting1" property="wantedmode" switcher_key="modeSwitcher"/> <property_switcher role="Camerasetting1" property="wantedmode"
switcher_key="modeSwitcher" />
<property_switcher role="Camerasetting1" property="modeFVB"
switcher_key="modeFVB" />
<newLine /> <newLine />
<check role="Camerasetting1" property="modeFVB" prefix="Camerasetting.FVBPrefix" checkBoxValues="Camerasetting.modeFVB"/>
<newLine/>
<property_switcher role="Camerasetting1" property="modeFVB" switcher_key="by_switcher"/>
<switchable_composite switcher_key="by_switcher" switch_values="true">
</switchable_composite>
<switchable_composite switcher_key="by_switcher" switch_values="false">
<table_composite nbColumns="3"> <table_composite nbColumns="3">
<group title="Camerasetting.bind"> <group title="Camerasetting.hbind">
<combo role="Camerasetting1" property="wantedBinning" <combo role="Camerasetting1" property="wantedhBinning"
prefix="Camerasetting.bindPrefix" valuesAndLabels="Camerasetting.2048,Camerasetting.1024,Camerasetting.512" /> prefix="Camerasetting.bindPrefix" valuesAndLabels="Camerasetting.2048,Camerasetting.1024,Camerasetting.512" />
<newLine /> <newLine />
</group> </group>
<group title="Camerasetting.vbind">
<combo role="Camerasetting1" property="wantedvBinning"
prefix="Camerasetting.bindPrefix" valuesAndLabels="Camerasetting.2048,Camerasetting.1024,Camerasetting.512" />
<newLine /> <newLine />
<group title="Camerasetting.orientation">
<check role="Camerasetting1" property="hflip"
prefix="Camerasetting.hflipPrefix" checkBoxValues="Camerasetting.hflip" />
<newLine />
<check role="Camerasetting1" property="vflip"
prefix="Camerasetting.vflipPrefix" checkBoxValues="Camerasetting.vflip" />
<newLine />
<combo role="Camerasetting1" property="rotate"
prefix="Camerasetting.rotatePrefix" valuesAndLabels="Camerasetting.None,Camerasetting.CW90,Camerasetting.CCW90" />
</group> </group>
<newLine /> <newLine />
<!-- <group title="Camerasetting.orientation"> -->
<!-- <check role="Camerasetting1" property="hflip" -->
<!-- prefix="Camerasetting.hflipPrefix" checkBoxValues="Camerasetting.hflip" /> -->
<!-- <newLine /> -->
<!-- <check role="Camerasetting1" property="vflip" -->
<!-- prefix="Camerasetting.vflipPrefix" checkBoxValues="Camerasetting.vflip" /> -->
<!-- <newLine /> -->
<!-- <combo role="Camerasetting1" property="rotate" -->
<!-- prefix="Camerasetting.rotatePrefix" valuesAndLabels="Camerasetting.None,Camerasetting.CW90,Camerasetting.CCW90" /> -->
<!-- </group> -->
<!-- <newLine /> -->
</table_composite>
</switchable_composite>
<group title="Camerasetting.kine"> <group title="Camerasetting.kine">
<combo role="Camerasetting1" property="wantedmode" <combo role="Camerasetting1" property="wantedmode"
prefix="Camerasetting.modePrefix" valuesAndLabels="Camerasetting.Count,Camerasetting.Kine" /> prefix="Camerasetting.modePrefix" valuesAndLabels="Camerasetting.Count,Camerasetting.Kine" />
<newLine /> <newLine />
<switchable_composite switcher_key="modeSwitcher" switch_values="3"> <switchable_composite switcher_key="modeSwitcher"
<text role="Camerasetting1" property="nbKine" prefix="Camerasetting.wanted_kine" /> switch_values="3">
<text role="Camerasetting1" property="nbKine"
prefix="Camerasetting.wanted_kine" />
</switchable_composite> </switchable_composite>
</group> </group>
</table_composite>
</plugin> </plugin>
......
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