Commit 298c8053 authored by ics's avatar ics
Browse files

Merge branch V3.1_182 into master

parent 93859a03
This diff is collapsed.
......@@ -5,3 +5,4 @@
/configure
/INSTALL
/Makefile.in
.settings/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.config.gnu.exe.debug.779576013" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" ref="shared-provider"/>
</extension>
</configuration>
<configuration id="cdt.managedbuild.config.gnu.exe.release.867724389" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" ref="shared-provider"/>
</extension>
</configuration>
</project>
......@@ -5,10 +5,10 @@
SUBDIRS = src
am: uninstall
cd ../src; java -classpath ../modgen.jar generator.Main -config $(NOMAD_MODULE_CONFIG)
cd ../src; java -jar ../nomad-module-generator-0.1.0-full.jar -config $(NOMAD_MODULE_CONFIG)
am_nouninstall:
cd ../src; java -classpath ../modgen.jar generator.Main -config $(NOMAD_MODULE_CONFIG)
cd ../src; java -jar ../nomad-module-generator-0.1.0-full.jar -config $(NOMAD_MODULE_CONFIG)
mod_install : am
$(MAKE) install
......@@ -18,4 +18,3 @@ mod: mod_install
sequence:
$(NOMAD_HOME)/bin/moduleloadsequencer.sh
......@@ -10,7 +10,7 @@ mkdir build
cd src
java -classpath ../modgen.jar generator.Main -config $NOMAD_MODULE_CONFIG
java -jar ../nomad-module-generator-0.1.0-full.jar -config $NOMAD_MODULE_CONFIG
cd $path
......
......@@ -22,6 +22,7 @@
#include "controllers/common/axis/AxisController.h"
#include "controllers/lss/figaro/DetA.h"
#include "controllers/lss/figaro/DetH.h"
using namespace std;
namespace axis {
......
......@@ -42,7 +42,7 @@ public:
private:
std::auto_ptr<std::ofstream> m_dataFile;
int64 m_initialDate;
std::map<string, ExperimentController*> m_experimentControllersMap;
std::map<std::string, ExperimentController*> m_experimentControllersMap;
};
......
/*
* 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 "DualCount.h"
using namespace std;
namespace cadarache {
const string DualCount::TYPE = "dual_acquisition";
/*
* Constructor
*/
DualCount::DualCount(const std::string& name) :
KineticCount(name) {
registerFunction(TYPE);
m_DPPTimeGate.init(this, "dpp_gate");
}
/*
* postConfiguration
*/
void DualCount::postConfiguration() {
Count::postConfiguration();
m_KineticAcquisitionControllers.resize(nDetectors());
for (int32 i = 0; i < nDetectors(); ++i) {
m_KineticAcquisitionControllers[0].copy(acquisitionControllers[0]);
}
registerUpdater(m_KineticAcquisitionControllers[0]->time, &DualCount::updateActualTime, this);
registerUpdater(m_KineticAcquisitionControllers[0]->timeSetPoint, &DualCount::updateTimeSetPoint, this);
registerUpdater(m_KineticAcquisitionControllers[0]->nbRepaint, &DualCount::updateNbRepaint, this);
}
/*
* preStart
*/
void DualCount::preStart() {
m_KineticAcquisitionControllers[0]->slicesFile = slicesFile();
m_KineticAcquisitionControllers[0]->nbRepaint.setpoint = localReps();
}
/*
* gateStart
*/
void DualCount::gateStart() {
m_DPPTimeGate->mode = acquisition::TimeAcquisitionController::TIME_MODE;
m_DPPTimeGate->timeType = acquisition::TimeAcquisitionController::SECOND;
m_DPPTimeGate->time.setpoint = m_TimeSetPointSecond;
time10.setpoint = m_TimeSetPointSecond * 10;
time100.setpoint = m_TimeSetPointSecond * 100;
time1000.setpoint = m_TimeSetPointSecond * 1000;
preset = m_TimeSetPointSecond * 1000.;
m_KineticAcquisitionControllers[0]->startCountingParallel(false);
// wait kinetic ready
while(m_KineticAcquisitionControllers[0]->gateStatus() != acquisition::GateCommon::WAITFORSTART_STATUS) {
boost::this_thread::yield();
}
m_DPPTimeGate->startCountingCommand();
}
/*
* gateSynchro
*/
void DualCount::gateSynchro() {
// Start gate
//m_KineticGate->synchronizeReadCommand(false);
m_DPPTimeGate->synchronizeReadCommand(false);
}
/*
* pause
*/
void DualCount::pause() {
log(Level::s_Info) << "pause" << endlog;
m_KineticAcquisitionControllers[0]->pauseParallel(false);
m_DPPTimeGate->pauseParallel(false);
}
/*
* resume
*/
void DualCount::resume() {
m_KineticAcquisitionControllers[0]->resumeParallel(false);
m_DPPTimeGate->resumeParallel(false);
log(Level::s_Info) << "continu" << endlog;
}
/*
* stop
*/
void DualCount::stop() {
m_DPPTimeGate->stopParallel(false);
m_KineticAcquisitionControllers[0]->stopParallel(false);
log(Level::s_Info) << "stopped" << endlog;
}
}
......@@ -16,32 +16,48 @@
* limitations under the Licence.
*/
#ifndef NPP_LISTMODEBLOCK_H
#define NPP_LISTMODEBLOCK_H
#ifndef DUALCOUNT_H
#define DUALCOUNT_H
#include <iostream>
#include <vector>
#include <string>
#include "controllers/common/datafile/DataBlock.h"
class AbstractController;
#include "controllers/common/acquisition/KineticCount.h"
#include "controllers/common/acquisition/mode/TimeAcquisitionController.h"
namespace npp {
namespace cadarache {
class ListModeBlock: public DataBlock {
class DualCount: public acquisition::KineticCount {
public:
ListModeBlock(uint32 nbdetectors, const vector<AbstractController*>& detectorControllers);
virtual ~ListModeBlock();
void writeBlock(std::ofstream & file);
//! Type of controller
static const std::string TYPE;
/*!
* \brief Constructor
* \param[in] name the name of controller
*/
DualCount(const std::string& name);
virtual void postConfiguration();
protected:
virtual void stop();
private:
uint32 m_NbDetectors;
std::vector<AbstractController*> m_DetectorControllers;
uint32 m_Oldlistmodedatasize;
virtual void preStart();
virtual void gateStart();
virtual void gateSynchro();
virtual void pause();
virtual void resume();
ControllerPtr<acquisition::TimeAcquisitionController> m_DPPTimeGate;
};
}
#endif
#endif // KINETICCOUNT_H
<module name="cadarache">
<controller class="cadarache::DualCount"/>
<include path="$(NOMAD_HOME)/../NomadModules/src"/>
</module>
<controller_plugin_config type="dual_acquisition" inherit="kinetic_acquisition">
</controller_plugin_config>
......@@ -21,6 +21,7 @@
#include <boost/lexical_cast.hpp>
using namespace boost;
using namespace std;
namespace camera {
......@@ -43,6 +44,18 @@ CameraSetting::CameraSetting(const string& name) :
kineTime.init(this, SAVE, "kineTime");
modeFVB.init(this, SAVE, "modeFVB");
rotate.init(this, SAVE, "rotate");
cooling.init(this, SAVE, "cooling");
readout.init(this, SAVE, "readout");
shutopentime.init(this, SAVE, "shutopentime");
shutclosetime.init(this, SAVE, "shutclosetime");
shutmode.init(this, SAVE, "shutmode");
hsspeed.init(this, SAVE, "hsspeed");
gain.init(this, SAVE, "gain");
bclamp.init(this, SAVE, "bclamp");
tempstatus.init(this, SAVE, "tempstatus");
vsspeed.init(this, SAVE, "vsspeed");
stringvbinning.init(this, NOSAVE| SPY, "actualstringvbin", "wantedstringvbin", "vBinn");
stringhbinning.init(this, NOSAVE| SPY, "actualstringhbin", "wantedstringhbin", "hBinn");
......@@ -144,6 +157,18 @@ void CameraSetting::start() {
m_CamDriver->execute("writeParam");
rotate = m_CamDriver->rotate();
cooling= m_CamDriver->cooling ();
readout = m_CamDriver->readout ();
shutopentime = m_CamDriver->shutopentime ();
shutclosetime = m_CamDriver->shutclosetime ();
shutmode = m_CamDriver->shutmode ();
hsspeed = m_CamDriver->hsspeed ();
bclamp = m_CamDriver->bclamp ();
gain = m_CamDriver->gain ();
tempstatus = m_CamDriver->tempstatus ();
vsspeed = m_CamDriver->vsspeed ();
}
......
......@@ -39,8 +39,8 @@ class CameraSetting : public ExperimentController, public controller::Start {
public:
//! Type of controller
static const std::string TYPE;
static const string BINNING[5];
static const string MODE[5];
static const std::string BINNING[5];
static const std::string MODE[5];
/**
* Constructor.
......@@ -85,12 +85,25 @@ public:
Property<bool > modeFVB;
Property<int32, SETPOINT> temperature;
Property<string, SETPOINT> stringhbinning;
Property<string, SETPOINT> stringvbinning;
Property<string, SETPOINT> stringmode;
Property<std::string, SETPOINT> stringhbinning;
Property<std::string, SETPOINT> stringvbinning;
Property<std::string, SETPOINT> stringmode;
Property<int32, SETPOINT> hbinning;
Property<int32, SETPOINT> vbinning;
Property<int32> rotate;
Property<int32> cooling;
Property<int32> readout;
Property<int32> shutopentime;
Property<int32> shutclosetime;
Property<int32> shutmode;
Property<int32> hsspeed;
Property<int32> bclamp;
Property<int32> gain;
Property<int32> tempstatus;
Property<int32> vsspeed;
DriverPtr<ikon::IKonDriver> m_CamDriver;
ControllerPtr<acquisition::DetectorElement> detectorElement;
ControllerPtr<acquisition::DetectorController> detectorController;
......
......@@ -68,7 +68,7 @@ public:
Property<float64> endedPosition;
Property<float64> deltaPosition;
Property<float64> exposureTime;
Property<string> rgbData;
Property<std::string> rgbData;
private:
......
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
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