Commit fb8e4587 authored by Cristina Cocho's avatar Cristina Cocho

Merge branch 'V3.1_182' of

https://code.ill.fr/instrument-control/nomad-modules.git into V3.1_182

Conflicts:
	src/controllers/lss/common/SampleSequencer.cpp
parents dc140e64 a5d855ec
......@@ -53,6 +53,9 @@ public:
virtual bool isCounting() const = 0;
virtual bool isPausing() const = 0;
virtual void setNoDataRead() = 0;
virtual void clearNoDataRead() = 0;
void init(const std::string& name);
};
......
......@@ -82,6 +82,7 @@ Count::Count(const string& name) {
totalReps.update(1);
localReps.update(1);
m_ListModeBlock = nullptr;
m_NoDataRead = false;
// Disable histogramming
setHistogramming(false);
......@@ -145,10 +146,10 @@ void Count::postConfiguration() {
// TODO gate registerUpdater(axisDriver->axisStatus, &Count::updateActualCycle, this);
registerUpdater(masterDetector->detSum, &Count::updateMasterDetectorDetSum, this);
if (nMonitors() >= 1) {
registerUpdater(m_Monitors[0]->detSum, &Count::updateMonitor1DetSum, this);
registerUpdater(monitors[0]->detSum, &Count::updateMonitor1DetSum, this);
}
if (nMonitors() >= 2) {
registerUpdater(m_Monitors[1]->detSum, &Count::updateMonitor2DetSum, this);
registerUpdater(monitors[1]->detSum, &Count::updateMonitor2DetSum, this);
}
registerUpdater(experimentData->numor, &Count::updateNumor, this);
registerUpdater(gate->gateStatus, &Count::updateStatus, this);
......@@ -244,7 +245,7 @@ void Count::refreshNMonitorsProperty(int32 value) throw (CannotSetValue) {
for (int32 i = 0; i < value; ++i) {
string os = "monitor" + lexical_cast<string>(i + 1);
m_Monitors[i].init(this, os);
monitors[i].init(this, os);
}
}
......@@ -353,7 +354,7 @@ void Count::updateActualTime(float64 value, bool readdata) {
if (((m_OldActualTimeForUpdate + m_ReadUpdateTimeSec) <= time())
|| ((m_OldActualTimeForUpdate < 1.) && (time() > 1.))) {
// Wait finishing writing data before re-reading avoid to mixed n and n-1 data values
if (experimentData->isDataSaved() == true) {
if ((experimentData->isDataSaved() == true) && (m_NoDataRead == false)) {
for (int32 ki = 0; ki < nDetectors(); ++ki) {
detectorControllers[ki]->readParallel(false);
}
......@@ -428,7 +429,7 @@ void Count::updateMasterDetectorDetSum() {
void Count::updateMonitor1DetSum() {
if (m_Counting) {
// mon1Sum.update(m_Monitors[0]->detSum());
mon1Sum = m_Monitors[0]->detSum();
mon1Sum = monitors[0]->detSum();
float64 ltime = 0;
if (m_UseMasterAcq == false) {
ltime = time() + m_TimeSetPointSecond * (currentLocalReps() - 1);
......@@ -438,9 +439,9 @@ void Count::updateMonitor1DetSum() {
// Calculate rate
if (ltime > 0.001) {
//float64 rate = sum / time;
m_Monitors[0]->setDetectorRate(ltime);
monitors[0]->setDetectorRate(ltime);
// mon1Rate.update(m_Monitors[0]->detRate());
mon1Rate = m_Monitors[0]->detRate();
mon1Rate = monitors[0]->detRate();
}
}
}
......@@ -451,7 +452,7 @@ void Count::updateMonitor1DetSum() {
void Count::updateMonitor2DetSum() {
if (m_Counting) {
// mon2Sum.update(m_Monitors[1]->detSum());
mon2Sum = m_Monitors[1]->detSum();
mon2Sum = monitors[1]->detSum();
float64 ltime = 0;
if (m_UseMasterAcq == false) {
ltime = time() + m_TimeSetPointSecond * (currentLocalReps() - 1);
......@@ -461,9 +462,9 @@ void Count::updateMonitor2DetSum() {
// Calculate rate
if (ltime > 0.001) {
//float64 rate = sum / time;
m_Monitors[1]->setDetectorRate(ltime);
monitors[1]->setDetectorRate(ltime);
// mon2Rate.update(m_Monitors[1]->detRate());
mon2Rate = m_Monitors[1]->detRate();
mon2Rate = monitors[1]->detRate();
}
}
}
......@@ -734,14 +735,16 @@ void Count::start() {
break;
}
if ((localReps() > 1) && (iLocalRep < (localReps() - 1)) && (isStopped() == false)) {
if ((localReps() > 1) && (iLocalRep < (localReps() - 1)) && (isStopped() == false) && (m_NoDataRead == false)) {
for (int32 ki = 0; ki < nDetectors(); ++ki) {
detectorControllers[ki]->readParallel(false);
}
}
}
gateSynchro();
if (m_NoDataRead == false) {
gateSynchro();
}
if ((Simulated::activated == false) && (useEnergy == true)) {
/*
......@@ -759,7 +762,7 @@ void Count::start() {
* Write the final data at the end
* Use synchronize read, be sure data was read for saving on file
*/
if (Simulated::activated == false) {
if ((Simulated::activated == false) && (m_NoDataRead == false)) {
statusMessage.update(READING_DATA_MESSAGE);
Parallel::begin();
for (int32 ki = 0; ki < nDetectors(); ++ki) {
......@@ -1242,4 +1245,5 @@ void Count::setListModeContext() {
}
}
}
......@@ -91,6 +91,7 @@ public:
virtual void start();
ControllerPtr<DetectorElement> masterDetector;
ControllerPtr<DetectorElement> monitors[2];
/**
* Multiple count type we need array
......@@ -114,6 +115,9 @@ public:
static const std::string CLOSE_DATA_MESSAGE;
static const std::string IDLE_MESSAGE;
virtual void setNoDataRead();
virtual void clearNoDataRead();
protected:
virtual void postConfiguration();
......@@ -157,7 +161,6 @@ protected:
/**
* MasterDetector is used to give the sum to UI
*/
ControllerPtr<DetectorElement> m_Monitors[2];
int32 m_nRegisteredConfigurationDetectors;
......@@ -184,8 +187,23 @@ protected:
ListModeBlock* m_ListModeBlock;
void setListModeContext();
bool m_NoDataRead;
};
/*
* setNoDataRead
*/
inline void Count::setNoDataRead() {
m_NoDataRead = true;
}
/*
* clearNoDataRead
*/
inline void Count::clearNoDataRead() {
m_NoDataRead = false;
}
}
#endif // COUNT_H
......@@ -47,10 +47,10 @@ void FcuCount::postConfiguration() {
m_FcuMasterDetector.copy(masterDetector);
if (nMonitors() > 0) {
m_FcuMonitors[0].copy(m_Monitors[0]);
m_FcuMonitors[0].copy(monitors[0]);
}
if (nMonitors() > 1) {
m_FcuMonitors[1].copy(m_Monitors[1]);
m_FcuMonitors[1].copy(monitors[1]);
}
m_FcuAcquisitionControllers.resize(nDetectors());
for (int32 i = 0; i < nDetectors(); ++i) {
......
......@@ -5,8 +5,13 @@ option optimize_for = LITE_RUNTIME;
message PropertyRequest {
required string controllerName = 1;
required string propertyName = 2;
required string propertyType = 3;
}
message PropertyResponse {
message PropertyFloat64Response {
required double value = 1;
}
message PropertyInt32Response {
required int32 value = 1;
}
......@@ -40,7 +40,12 @@ RemotePropertyController::RemotePropertyController(const string& name) :
nbProperties.init(this, SAVE, "nb_properties");
controllerNames.init(this, SAVE, "controller_names");
propertyNames.init(this, SAVE, "property_names");
propertyTypes.init(this, SAVE, "property_types");
loopTimeSec.init(this, SAVE, "loop_time_sec");
loopTimeSec.update(5);
retryTimeSec.init(this, SAVE, "retry_time_sec");
retryTimeSec.update(60);
serverEndpoint.init(this, SAVE, "cameo_server");
initialized.init(this, NOSAVE, "initialized");
......@@ -67,12 +72,18 @@ RemotePropertyController::RemotePropertyController(const RemotePropertyControlle
*/
RemotePropertyController::~RemotePropertyController() {
map<pair<string, string>, Property<float64>*>::iterator iter = m_Properties.begin();
while (iter != m_Properties.end()) {
map<pair<string, string>, Property<float64>*>::iterator iter = m_Float64Properties.begin();
while (iter != m_Float64Properties.end()) {
Property<float64>* prop = iter->second;
delete prop;
++iter;
}
map<pair<string, string>, Property<int32>*>::iterator iter2 = m_Int32Properties.begin();
while (iter2 != m_Int32Properties.end()) {
Property<int32>* prop = iter2->second;
delete prop;
++iter2;
}
if (initialized()) {
_active = false;
// Stop the remote application.
......@@ -94,14 +105,26 @@ void RemotePropertyController::postConfiguration() {
// Create property
for (int32 i = 0; i < controllerNames.getSize(); ++i) {
Property<float64>* prop = new Property<float64>();
ostringstream pname;
if (serverEndpoint().empty() == false) {
pname << serverEndpoint() << "_";
if (propertyTypes.get(i) == "int32") {
Property<int32>* prop = new Property<int32>();
ostringstream pname;
if (serverEndpoint().empty() == false) {
pname << serverEndpoint() << "_";
}
pname << controllerNames.get(i) << "_" << propertyNames.get(i);
prop->init(this, NOSAVE, pname.str());
m_Int32Properties[make_pair(controllerNames.get(i), propertyNames.get(i))] = prop;
}
else {
Property<float64>* prop = new Property<float64>();
ostringstream pname;
if (serverEndpoint().empty() == false) {
pname << serverEndpoint() << "_";
}
pname << controllerNames.get(i) << "_" << propertyNames.get(i);
prop->init(this, NOSAVE, pname.str());
m_Float64Properties[make_pair(controllerNames.get(i), propertyNames.get(i))] = prop;
}
pname << controllerNames.get(i) << "_" << propertyNames.get(i);
prop->init(this, NOSAVE, pname.str());
m_Properties[make_pair(controllerNames.get(i), propertyNames.get(i))] = prop;
}
if (m_driver->state() == REAL_DEVICE_CONTAINER) {
......@@ -119,6 +142,7 @@ void RemotePropertyController::refreshNbProperties(int32 value) throw (CannotSet
}
controllerNames.resize(value);
propertyNames.resize(value);
propertyTypes.resize(value);
}
bool RemotePropertyController::initApplication() {
......@@ -177,20 +201,27 @@ bool RemotePropertyController::initApplication() {
void RemotePropertyController::executeLoop() {
while (_active) {
if (initialized() == true) {
map<pair<string, string>, Property<float64>*>::iterator iter = m_Properties.begin();
while (iter != m_Properties.end()) {
map<pair<string, string>, Property<float64>*>::iterator iter = m_Float64Properties.begin();
while (iter != m_Float64Properties.end()) {
Property<float64>* prop = iter->second;
pair<string, string> names = iter->first;
prop->update(getPropertyValue(names.first, names.second));
++iter;
}
map<pair<string, string>, Property<int32>*>::iterator iter2 = m_Int32Properties.begin();
while (iter2 != m_Int32Properties.end()) {
Property<int32>* prop = iter2->second;
pair<string, string> names = iter2->first;
prop->update(getPropertyInt32Value(names.first, names.second));
++iter2;
}
if (!m_application->exists()) {
initialized = false;
sleep(60);
sleep(retryTimeSec());
}
sleep(5);
sleep(loopTimeSec());
} else {
sleep(60);
sleep(retryTimeSec());
initialized = initApplication();
}
}
......@@ -213,6 +244,35 @@ float64 RemotePropertyController::getPropertyValue(const string& cname, const st
request.set_controllername(cname);
request.set_propertyname(pname);
request.set_propertytype("float64");
// Send the message.
m_requester->sendBinary(request.SerializeAsString());
// cout << getName() << " sent property request " << cname << ":" << pname << endl;
// Wait for the response synchronously.
// Note that responses can be processed asynchronously if the server is able to.
string data;
m_requester->receiveBinary(data);
proto::PropertyFloat64Response response;
response.ParseFromString(data);
return response.value();
}
/*
* getPropertyInt32Value
*/
int32 RemotePropertyController::getPropertyInt32Value(const string& cname, const string& pname) {
// Serialize the request.
proto::PropertyRequest request;
request.set_controllername(cname);
request.set_propertyname(pname);
request.set_propertytype("int32");
// Send the message.
m_requester->sendBinary(request.SerializeAsString());
......@@ -224,7 +284,7 @@ float64 RemotePropertyController::getPropertyValue(const string& cname, const st
string data;
m_requester->receiveBinary(data);
proto::PropertyResponse response;
proto::PropertyInt32Response response;
response.ParseFromString(data);
return response.value();
......@@ -232,8 +292,16 @@ float64 RemotePropertyController::getPropertyValue(const string& cname, const st
Property<float64>* RemotePropertyController::getProperty(const std::string& controllerName, const std::string& propertyName) {
Property<float64>* prop = nullptr;
if (m_Properties.find(make_pair(controllerName, propertyName)) != m_Properties.end()) {
prop = m_Properties[make_pair(controllerName, propertyName)];
if (m_Float64Properties.find(make_pair(controllerName, propertyName)) != m_Float64Properties.end()) {
prop = m_Float64Properties[make_pair(controllerName, propertyName)];
}
return prop;
}
Property<int32>* RemotePropertyController::getInt32Property(const std::string& controllerName, const std::string& propertyName) {
Property<int32>* prop = nullptr;
if (m_Int32Properties.find(make_pair(controllerName, propertyName)) != m_Int32Properties.end()) {
prop = m_Int32Properties[make_pair(controllerName, propertyName)];
}
return prop;
}
......
......@@ -62,20 +62,26 @@ public:
Property<int32> nbProperties;
DynamicProperty<std::string> controllerNames;
DynamicProperty<std::string> propertyNames;
DynamicProperty<std::string> propertyTypes;
Property<int32> loopTimeSec;
Property<int32> retryTimeSec;
Property<std::string> serverEndpoint;
Property<bool> initialized;
Property<float64>* getProperty(const std::string& controllerName, const std::string& propertyName);
Property<int32>* getInt32Property(const std::string& controllerName, const std::string& propertyName);
private:
bool initApplication();
float64 getPropertyValue(const std::string& cname, const std::string& pname);
int32 getPropertyInt32Value(const std::string& cname, const std::string& pname);
static void executeStaticLoop(RemotePropertyController* instance);
void executeLoop();
void refreshNbProperties(int32 value) throw(CannotSetValue);
std::map<std::pair<std::string, std::string>, Property<float64>* > m_Properties;
std::map<std::pair<std::string, std::string>, Property<float64>* > m_Float64Properties;
std::map<std::pair<std::string, std::string>, Property<int32>* > m_Int32Properties;
static const std::string REMOTE_APPLICATION;
static const std::string RESPONDER;
......
......@@ -147,59 +147,61 @@ void SampleSettings::postConfiguration() {
InstrumentManager::getInstance()->getAllInstalledExperimentControllersMap();
map<string, ExperimentController*>::iterator it;
for (it = experimentControllersMap.begin(); it != experimentControllersMap.end(); it++) {
if (dynamic_cast<SampleTemperatureController*>(it->second) != 0) {
SampleTemperatureController* temp = dynamic_cast<SampleTemperatureController*>(it->second);
if (temp->controllerType() == CRYOSTAT_TYPE) {
m_Cryostat = dynamic_cast<CryostatOrangeController*>(it->second);
m_types.push_back(CRYOSTAT_TYPE);
} else if (temp->controllerType() == CRYOFURNACE_TYPE) {
m_Cryofurnace = dynamic_cast<CryostatOrangeController*>(it->second);
m_types.push_back(CRYOFURNACE_TYPE);
} else if (temp->controllerType() == CRYOFURNACE_DUAL_EXCHANGER_TYPE) {
m_CryofurnaceDual = dynamic_cast<CryostatOrangeController*>(it->second);
m_types.push_back(CRYOFURNACE_DUAL_EXCHANGER_TYPE);
// } else if (temp->controllerType() == CRYOLOOP_TYPE) {
// m_Cryoloop = dynamic_cast<CryoLoopController*>(it->second);
// m_types.push_back(CRYOLOOP_TYPE);
} else if (temp->controllerType() == DISPLEX_TYPE) {
m_Displex = temp;
m_types.push_back(DISPLEX_TYPE);
} else if (temp->controllerType() == FURNACE_TYPE) {
m_Furnace = dynamic_cast<FurnaceController*>(it->second);
m_types.push_back(FURNACE_TYPE);
} else if (temp->controllerType() == THREEHE_REFREGIRATOR_TYPE) {
m_3HeRefregirator = temp;
m_types.push_back(THREEHE_REFREGIRATOR_TYPE);
} else if (temp->controllerType() == DILUTION_REFREGIRATOR_TYPE) {
m_DilutionRefregirator = temp;
m_types.push_back(DILUTION_REFREGIRATOR_TYPE);
} else if (temp->controllerType() == HIGH_MAGNETIC_FIELD_TYPE) {
m_HighMagneticFieldTemp = temp;
m_types.push_back(HIGH_MAGNETIC_FIELD_TYPE);
} else if (temp->controllerType() == TEDS17T_HIGH_MAGNETIC_FIELD_TYPE) {
m_Teds17THighMagneticFieldTemp = temp;
m_types.push_back(TEDS17T_HIGH_MAGNETIC_FIELD_TYPE);
} else if (temp->controllerType() == EASY_MAG_TYPE) {
m_EasyMagTemp = temp;
m_types.push_back(EASY_MAG_TYPE);
} else if (temp->controllerType() == CRYOSTREAM_TYPE) {
m_CryoStreamTemp = temp;
m_types.push_back(CRYOSTREAM_TYPE);
} else if (temp->controllerType() == THREEHE_REFREGIRATOR_INSERT_TYPE) {
m_3HeRefregiratorInsert = temp;
m_inserttypes.push_back(THREEHE_REFREGIRATOR_INSERT_TYPE);
} else if (temp->controllerType() == DILUTION_REFREGIRATOR_INSERT_TYPE) {
m_DilutionRefregiratorInsert = temp;
m_inserttypes.push_back(DILUTION_REFREGIRATOR_INSERT_TYPE);
} else if (temp->controllerType() == SPECIAL_STICK) {
m_inserttypes.push_back(SPECIAL_STICK);
}
} else if (dynamic_cast<MagneticFieldController*>(it->second) != 0) {
MagneticFieldController* mag = dynamic_cast<MagneticFieldController*>(it->second);
if (mag->controllerType() == OXFORD_HIGH_MAGNETIC_FIELD_TYPE) {
m_OxfordHighMagneticField = mag;
} else if (mag->controllerType() == TEDS17T_HIGH_MAGNETIC_FIELD_TYPE) {
m_Teds17THighMagneticField = mag;
if ((it->second)->getFamily().find(family::HIDDEN) == string::npos) {
if (dynamic_cast<SampleTemperatureController*>(it->second) != 0) {
SampleTemperatureController* temp = dynamic_cast<SampleTemperatureController*>(it->second);
if (temp->controllerType() == CRYOSTAT_TYPE) {
m_Cryostat = dynamic_cast<CryostatOrangeController*>(it->second);
m_types.push_back(CRYOSTAT_TYPE);
} else if (temp->controllerType() == CRYOFURNACE_TYPE) {
m_Cryofurnace = dynamic_cast<CryostatOrangeController*>(it->second);
m_types.push_back(CRYOFURNACE_TYPE);
} else if (temp->controllerType() == CRYOFURNACE_DUAL_EXCHANGER_TYPE) {
m_CryofurnaceDual = dynamic_cast<CryostatOrangeController*>(it->second);
m_types.push_back(CRYOFURNACE_DUAL_EXCHANGER_TYPE);
// } else if (temp->controllerType() == CRYOLOOP_TYPE) {
// m_Cryoloop = dynamic_cast<CryoLoopController*>(it->second);
// m_types.push_back(CRYOLOOP_TYPE);
} else if (temp->controllerType() == DISPLEX_TYPE) {
m_Displex = temp;
m_types.push_back(DISPLEX_TYPE);
} else if (temp->controllerType() == FURNACE_TYPE) {
m_Furnace = dynamic_cast<FurnaceController*>(it->second);
m_types.push_back(FURNACE_TYPE);
} else if (temp->controllerType() == THREEHE_REFREGIRATOR_TYPE) {
m_3HeRefregirator = temp;
m_types.push_back(THREEHE_REFREGIRATOR_TYPE);
} else if (temp->controllerType() == DILUTION_REFREGIRATOR_TYPE) {
m_DilutionRefregirator = temp;
m_types.push_back(DILUTION_REFREGIRATOR_TYPE);
} else if (temp->controllerType() == HIGH_MAGNETIC_FIELD_TYPE) {
m_HighMagneticFieldTemp = temp;
m_types.push_back(HIGH_MAGNETIC_FIELD_TYPE);
} else if (temp->controllerType() == TEDS17T_HIGH_MAGNETIC_FIELD_TYPE) {
m_Teds17THighMagneticFieldTemp = temp;
m_types.push_back(TEDS17T_HIGH_MAGNETIC_FIELD_TYPE);
} else if (temp->controllerType() == EASY_MAG_TYPE) {
m_EasyMagTemp = temp;
m_types.push_back(EASY_MAG_TYPE);
} else if (temp->controllerType() == CRYOSTREAM_TYPE) {
m_CryoStreamTemp = temp;
m_types.push_back(CRYOSTREAM_TYPE);
} else if (temp->controllerType() == THREEHE_REFREGIRATOR_INSERT_TYPE) {
m_3HeRefregiratorInsert = temp;
m_inserttypes.push_back(THREEHE_REFREGIRATOR_INSERT_TYPE);
} else if (temp->controllerType() == DILUTION_REFREGIRATOR_INSERT_TYPE) {
m_DilutionRefregiratorInsert = temp;
m_inserttypes.push_back(DILUTION_REFREGIRATOR_INSERT_TYPE);
} else if (temp->controllerType() == SPECIAL_STICK) {
m_inserttypes.push_back(SPECIAL_STICK);
}
} else if (dynamic_cast<MagneticFieldController*>(it->second) != 0) {
MagneticFieldController* mag = dynamic_cast<MagneticFieldController*>(it->second);
if (mag->controllerType() == OXFORD_HIGH_MAGNETIC_FIELD_TYPE) {
m_OxfordHighMagneticField = mag;
} else if (mag->controllerType() == TEDS17T_HIGH_MAGNETIC_FIELD_TYPE) {
m_Teds17THighMagneticField = mag;
}
}
}
}
......
......@@ -511,4 +511,18 @@ bool CountController::isPausing() const {
return count->isPausing();
}
/*
* setNoDataRead
*/
void CountController::setNoDataRead() {
count->setNoDataRead();
}
/*
* clearNoDataRead
*/
void CountController::clearNoDataRead() {
count->clearNoDataRead();
}
}
......@@ -70,6 +70,9 @@ public:
void logRepeaterCount();
virtual void setNoDataRead();
virtual void clearNoDataRead();
/**
* Properties
*/
......
......@@ -155,7 +155,7 @@ void CountSpy::updateProperty(ChangeAspect* aChangeAspect) {
refreshCountController(m_CountControllers[i]);
m_LastCounting = true;
counting = true;
time.update(0);
// time.update(0);
}
if (m_CountControllers[i]->isCounting()) {
try {
......@@ -253,6 +253,9 @@ void CountSpy::updateProperty(ChangeAspect* aChangeAspect) {
else if (propertyName == timeType.getName()) {
timeType.update(any_cast<string>(propvalue));
}
else if (propertyName == statusMessage.getName()) {
statusMessage.update(any_cast<string>(propvalue));
}
else if (propertyName == commandProgression.getName()) {
if (any_cast<int32>(propvalue) >= 100L){
m_LastCounting = false;
......@@ -417,6 +420,9 @@ void CountSpy::refreshCountController(acquisition::AbstractCount* aController) {
else if (propertyName == timeType.getName()) {
timeType.update(any_cast<string>(propvalue));
}
else if (propertyName == statusMessage.getName()) {
statusMessage.update(any_cast<string>(propvalue));
}
else if (propertyName == commandProgression.getName()) {
countProgression.update(any_cast<int32>(propvalue));
}
......@@ -505,4 +511,17 @@ string CountSpy::getImageName() {
}
return "";
}
void CountSpy::setNoDataRead() {
for (vector<acquisition::AbstractCount*>::iterator iter = m_CountControllers.begin(); iter != m_CountControllers.end(); ++iter) {
(*iter)->setNoDataRead();
}
}
void CountSpy::clearNoDataRead() {
for (vector<acquisition::AbstractCount*>::iterator iter = m_CountControllers.begin(); iter != m_CountControllers.end(); ++iter) {
(*iter)->clearNoDataRead();
}
}
}
......@@ -73,6 +73,9 @@ public:
void doPause();
void doResume();
void setNoDataRead();
void clearNoDataRead();
std::string getImageName();
protected:
......
......@@ -11,13 +11,13 @@
<controller class="utilities::CommandZoneSpy"/>
<controller class="utilities::CommentController"/>
<controller class="utilities::CountSpy"/>
<controller class="utilities::CountSpy"/>
<controller class="utilities::DataParams"/>
<controller class="utilities::InstrumentSettingController"/>
<controller class="utilities::MaintenanceController"/>
<controller class="utilities::NotificationController"/>
<controller class="utilities::ReactorPowerController"/>
<controller class="utilities::RemoteCountSynchro"/>
<controller class="utilities::StatisticEstimator"/>
<controller class="utilities::WaitController"/>
<controller class="utilities::InstrumentSettingController"/>
<controller class="utilities::NotificationController"/>
<controller class="utilities::MaintenanceController"/>
</module>
\ 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 <controllers/common/utilities/RemoteCountSynchro.h>
#include "controllers/common/family/Families.h"
using namespace std;
namespace utilities {
const string RemoteCountSynchro::TYPE = "remote_count_synchro";
/*
* Constructor
*/
RemoteCountSynchro::RemoteCountSynchro(const string& name) :
ExperimentController(name) {
countStatus.init(this, NOSAVE, "count_status");
setFamily(family::HIDDEN);
registerFunction(TYPE);
m_Remote.init(this, "remote");
m_Count.init(this, "count");
m_First = true;
}
/*
* Destructor
*/
RemoteCountSynchro::~RemoteCountSynchro() {
}
void RemoteCountSynchro::postConfiguration() {
registerUpdater(*(m_Remote->getInt32Property("Count", "commandStatus")), &RemoteCountSynchro::updateCountStatus, this);
countStatus.update((*(m_Remote->getInt32Property("Count", "commandStatus")))());