Commit c0af1979 authored by cyclops's avatar cyclops
Browse files

Add cyclops settings

parent 9366fff5
......@@ -16,8 +16,9 @@
* limitations under the Licence.
*/
#include "common/DirectCamera.h"
#include "controllers/common/family/Families.h"
#include "DirectCamera.h"
using namespace std;
......
Camerasetting.setup=Setup
Camerasetting.actual=Actual
Camerasetting.divisors=Divisors
Camerasetting.wanted_time=Time
Camerasetting.actual_time=Time
Camerasetting.wanted_kine=Nb Frame
Camerasetting.vbind=VBinning
Camerasetting.hbind=HBinning
# Mode combo
Camerasetting.2048Label=1*1
Camerasetting.2048Value=1
Camerasetting.1024Label=2*2
Camerasetting.1024Value=2
Camerasetting.512Label=4*4
Camerasetting.512Value=4
Camerasetting.orientation=Orientation
# Mode check
Camerasetting.hflipPrefix=H Flip
Camerasetting.hflipCheckedValue=1
Camerasetting.hflipUncheckedValue=0
Camerasetting.vflipPrefix=V Flip
Camerasetting.vflipCheckedValue=1
Camerasetting.vflipUncheckedValue=0
Camerasetting.rotatePrefix=Rotation
Camerasetting.bindPrefix=Binning
Camerasetting.CW90Label=CW 90
Camerasetting.CW90Value=1
Camerasetting.CCW90Label=CCW 90
Camerasetting.CCW90Value=2
Camerasetting.NoneLabel=None
Camerasetting.NoneValue=0
Camerasetting.modePrefix=Mode
Camerasetting.kine= Frame
Camerasetting.CountLabel=Single
Camerasetting.CountValue=1
Camerasetting.KineLabel=Multi
Camerasetting.KineValue=3
Camerasetting.FVBPrefix= Full Vertical Binning
Camerasetting.modeFVBCheckedValue=true
Camerasetting.modeFVBUncheckedValue=false
Camerasetting.wanted_temperature=Wanted Temp
Camerasetting.actual_temperature=Actual Temp
<plugin>
<controller type="Camerasetting" role="Camerasetting1" />
<property_switcher role="Camerasetting1" property="wantedmode"
switcher_key="modeSwitcher" />
<number_of_lines nb_lines="2" />
<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" />
<combo role="Camerasetting1" property="wantedmode" prefix="Camerasetting.modePrefix"
valuesAndLabels="Camerasetting.Count,Camerasetting.Kine" />
<switchable_composite switcher_key="modeSwitcher"
switch_values="3">
<text role="Camerasetting1" property="nbKine" prefix="Camerasetting.wanted_kine" />
</switchable_composite>
</plugin>
<controller_plugin_config type="Camerasetting">
<image key="HARDWARE_MMODULE"/>
<settings view="CamerasettingView.xml"/>
<command view="CamerasettingCommandView.xml"/>
</controller_plugin_config>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<controller type="Camerasetting">
<property name="wantedvBinning" type="long">
</property>
<property name="actualvBinning" type="long">
</property>
<property name="wantedhBinning" type="long">
</property>
<property name="actualhBinning" type="long">
</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>
<property name="wantedmode" type="long">
</property>
<property name="nbKine" type="long">
</property>
<property name="temperature" type="long">
</property>
<property name="kineTime" type="double">
</property>
<property name="modeFVB" type="boolean">
</property>
</controller>
<plugin>
<controller type="Cyclopssetting" role="Cyclopssetting1" />
<property_switcher role="Cyclopssetting1" property="wantedmode"
switcher_key="modeSwitcher" />
<property_switcher role="Cyclopssetting1" property="modeFVB"
switcher_key="modeFVB" />
<newLine />
<check role="Cyclopssetting1" property="modeFVB" prefix="Cyclopssetting.FVBPrefix" checkBoxValues="Cyclopssetting.modeFVB"/>
<newLine/>
<property_switcher role="Cyclopssetting1" 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">
<group title="Cyclopssetting.hbind">
<combo role="Cyclopssetting1" property="wantedhBinning"
prefix="Cyclopssetting.bindPrefix" valuesAndLabels="Cyclopssetting.2048,Cyclopssetting.1024,Cyclopssetting.512" />
<newLine />
</group>
<group title="Cyclopssetting.vbind">
<combo role="Cyclopssetting1" property="wantedvBinning"
prefix="Cyclopssetting.bindPrefix" valuesAndLabels="Cyclopssetting.2048,Cyclopssetting.1024,Cyclopssetting.512" />
<newLine />
</group>
<newLine />
<!-- <group title="Cyclopssetting.orientation"> -->
<!-- <check role="Cyclopssetting1" property="hflip" -->
<!-- prefix="Cyclopssetting.hflipPrefix" checkBoxValues="Cyclopssetting.hflip" /> -->
<!-- <newLine /> -->
<!-- <check role="Cyclopssetting1" property="vflip" -->
<!-- prefix="Cyclopssetting.vflipPrefix" checkBoxValues="Cyclopssetting.vflip" /> -->
<!-- <newLine /> -->
<!-- <combo role="Cyclopssetting1" property="rotate" -->
<!-- prefix="Cyclopssetting.rotatePrefix" valuesAndLabels="Cyclopssetting.None,Cyclopssetting.CW90,Cyclopssetting.CCW90" /> -->
<!-- </group> -->
<!-- <newLine /> -->
</table_composite>
</switchable_composite>
<group title="Cyclopssetting.kine">
<combo role="Cyclopssetting1" property="wantedmode"
prefix="Cyclopssetting.modePrefix" valuesAndLabels="Cyclopssetting.Count,Cyclopssetting.Kine" />
<newLine />
<switchable_composite switcher_key="modeSwitcher"
switch_values="3">
<text role="Cyclopssetting1" property="nbKine"
prefix="Cyclopssetting.wanted_kine" />
</switchable_composite>
</group>
</plugin>
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
#include "CyclopsSetting.h"
#include "controllers/common/family/Families.h"
#include <boost/lexical_cast.hpp>
using namespace boost;
namespace cyclops {
const std::string CyclopsSetting::TYPE = "Cyclopssetting";
CyclopsSetting::CyclopsSetting(const string& name) :
ExperimentController(name), controller::Start(this) {
setFamily(family::ACQUISITION, family::SETTING);
mode.init(this, SAVE, "actualmode", "wantedmode");
nbKine.init(this, SAVE, "nbKine");
kineTime.init(this, SAVE, "kineTime");
gain.init(this, SAVE, "gain");
modeBP.init(this, SAVE, "modeBP");
fileDirectory.init(this, SAVE, "fileDirectory");
fileName.init(this, SAVE, "fileName");
m_CamDriver.init(this, "cammeraDriver");
registerFunction(TYPE);
}
CyclopsSetting::~CyclopsSetting() {
}
void CyclopsSetting::postConfiguration() {
// mode=m_CamDriver->acqmode();
//stringmode=MODE[mode()];
registerRefresher(mode, &CyclopsSetting::refreshMode, this);
// registerUpdater(m_CamDriver->acqmode, &CyclopsSetting::updateMode, this);
}
void CyclopsSetting::start() {
// Test speed BOB
//hbinning.setpoint = 1;
//vbinning.setpoint = 2088;
m_CamDriver->acqmode = mode.setpoint();
m_CamDriver->nbSlicesAcq = nbKine();
m_CamDriver->bpixel = modeBP();
m_CamDriver->gain = gain();
m_CamDriver->execute("writeParam");
}
void CyclopsSetting::refreshMode(int32 value) {
}
void CyclopsSetting::updateMode() {
// mode=m_CamDriver->acqmode();
}
}
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
/*!
* \brief Class described the camera setting
* \author elaazzouzi
* \date 02-11-2016
*/
#ifndef CameraSETTING_H
#define CameraSETTING_H
#include "controllers/common/acquisition/detector/DetectorElement.h"
#include "controllers/common/acquisition/detector/DetectorController.h"
#include "drivers/photonic/psl/PslDriver.h"
namespace cyclops {
/**
* Class providing the Camera parameters.
*/
class CyclopsSetting : public ExperimentController, public controller::Start {
public:
//! Type of controller
static const std::string TYPE;
static const string BINNING[5];
static const string MODE[5];
/**
* Constructor.
*/
CyclopsSetting(const std::string& name);
/**
* Destructor.
*/
virtual ~CyclopsSetting();
/**
* Configuration after controller assignments.
*/
virtual void postConfiguration();
/**
* Start command.
*/
virtual void start();
/**
* Refreshes binning.
*/
void refreshMode(int32 value);
void updateMode();
void updateTemperature();
//
// Property<int32> hflip;
// Property<int32> vflip;
// Property<int32> rotate;
Property<int32, SETPOINT> mode;
Property<float64> kineTime;
Property<int32> nbKine;
Property<int32> gain;
Property<bool > modeBP;
Property<string> fileDirectory;
Property<string> fileName;
DriverPtr<psl::PslDriver> m_CamDriver;
};
}
#endif
<module name="cyclops">
<controller class="cyclops::CyclopsSetting"/>
<include path="$(NOMAD_HOME)/../NomadModules/src"/>
</module>
Cyclopssetting.setup=Setup
Cyclopssetting.actual=Actual
Cyclopssetting.divisors=Divisors
Cyclopssetting.wanted_time=Time
Cyclopssetting.actual_time=Time
Cyclopssetting.wanted_kine=Nb Frame
Cyclopssetting.vbind=VBinning
Cyclopssetting.hbind=HBinning
# Mode combo
Cyclopssetting.2048Label=1*1
Cyclopssetting.2048Value=1
Cyclopssetting.1024Label=2*2
Cyclopssetting.1024Value=2
Cyclopssetting.512Label=4*4
Cyclopssetting.512Value=4
Cyclopssetting.orientation=Orientation
# Mode check
Cyclopssetting.hflipPrefix=H Flip
Cyclopssetting.hflipCheckedValue=1
Cyclopssetting.hflipUncheckedValue=0
Cyclopssetting.vflipPrefix=V Flip
Cyclopssetting.vflipCheckedValue=1
Cyclopssetting.vflipUncheckedValue=0
Cyclopssetting.rotatePrefix=Rotation
Cyclopssetting.bindPrefix=Binning
Cyclopssetting.CW90Label=CW 90
Cyclopssetting.CW90Value=1
Cyclopssetting.CCW90Label=CCW 90
Cyclopssetting.CCW90Value=2
Cyclopssetting.NoneLabel=None
Cyclopssetting.NoneValue=0
Cyclopssetting.modePrefix=Mode
Cyclopssetting.kine= Frame
Cyclopssetting.CountLabel=Single
Cyclopssetting.CountValue=1
Cyclopssetting.KineLabel=Multi
Cyclopssetting.KineValue=3
Cyclopssetting.StandardLabel=Standard
Cyclopssetting.StandardValue=0
Cyclopssetting.AverageLabel=Average
Cyclopssetting.AverageValue=1
Cyclopssetting.SummationLabel=Summation
Cyclopssetting.SummationValue=2
Cyclopssetting.AccumulationLabel=Accumulation
Cyclopssetting.AccumulationValue=3
Cyclopssetting.BPPrefix= Bright Pixel
Cyclopssetting.modeBPCheckedValue=true
Cyclopssetting.modeBPBUncheckedValue=false
Cyclopssetting.wanted_temperature=Wanted Temp
Cyclopssetting.actual_temperature=Actual Temp
<plugin>
<controller type="Cyclopssetting" role="Cyclopssetting1" />
<property_switcher role="Cyclopssetting1" property="wantedmode"
switcher_key="modeSwitcher" />
<number_of_lines nb_lines="2" />
<combo role="Cyclopssetting1" property="wantedmode" prefix="Cyclopssetting.modePrefix"
valuesAndLabels="Cyclopssetting.Count,Cyclopssetting.Kine" />
<switchable_composite switcher_key="modeSwitcher"
switch_values="3">
<text role="Cyclopssetting1" property="nbKine" prefix="Cyclopssetting.wanted_kine" />
</switchable_composite>
</plugin>
<controller_plugin_config type="Cyclopssetting">
<image key="HARDWARE_MMODULE"/>
<settings view="CyclopssettingView.xml"/>
<command view="CyclopssettingCommandView.xml"/>
</controller_plugin_config>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<controller type="Cyclopssetting">
<property name="actualmode" type="long">
</property>
<property name="wantedmode" type="long">
</property>
<property name="nbKine" type="long">
</property>
<property name="kineTime" type="double">
</property>
<property name="modeBP" type="boolean">
</property>
</controller>
<plugin>
<controller type="Cyclopssetting" role="Cyclopssetting1" />
<property_switcher role="Cyclopssetting1" property="wantedmode"
switcher_key="modeSwitcher" />
<property_switcher role="Cyclopssetting1" property="modeBP"
switcher_key="modeBP" />
<newLine />
<check role="Cyclopssetting1" property="modeBP" prefix="Cyclopssetting.BPPrefix" checkBoxValues="Cyclopssetting.modeBP"/>
<newLine/>
<property_switcher role="Cyclopssetting1" property="modeBP" 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">
<!-- <group title="Cyclopssetting.orientation"> -->
<!-- <check role="Cyclopssetting1" property="hflip" -->
<!-- prefix="Cyclopssetting.hflipPrefix" checkBoxValues="Cyclopssetting.hflip" /> -->
<!-- <newLine /> -->
<!-- <check role="Cyclopssetting1" property="vflip" -->
<!-- prefix="Cyclopssetting.vflipPrefix" checkBoxValues="Cyclopssetting.vflip" /> -->
<!-- <newLine /> -->
<!-- <combo role="Cyclopssetting1" property="rotate" -->
<!-- prefix="Cyclopssetting.rotatePrefix" valuesAndLabels="Cyclopssetting.None,Cyclopssetting.CW90,Cyclopssetting.CCW90" /> -->
<!-- </group> -->
<!-- <newLine /> -->
</table_composite>
</switchable_composite>
<group title="Cyclopssetting.kine">
<combo role="Cyclopssetting1" property="wantedmode"
prefix="Cyclopssetting.modePrefix" valuesAndLabels="Cyclopssetting.Standard,Cyclopssetting.Average,Cyclopssetting.Summation,Cyclopssetting.Accumulation" />
<newLine />
<switchable_composite switcher_key="modeSwitcher"
switch_values="3">
<text role="Cyclopssetting1" property="nbKine"
prefix="Cyclopssetting.wanted_kine" />
</switchable_composite>
</group>
</plugin>
\ No newline at end of file
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