Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
6092e4c1
Commit
6092e4c1
authored
Dec 17, 2021
by
Locatelli
Browse files
Revue of configuration, phase 1
parent
339a7885
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/controllers/lss/autoconfig/LssAutoConfig.cpp
View file @
6092e4c1
...
...
@@ -305,7 +305,7 @@ void LssAutoConfig::updateCountStatusMessage() {
try
{
m_count
=
dynamic_cast
<
acquisition
::
Count
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
m_countSpy
->
countControllerName
()));
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
name
<<
" missing controller "
<<
m_countSpy
->
countControllerName
()
<<
endlog
;
return
;
}
...
...
@@ -496,7 +496,7 @@ void LssAutoConfig::start() {
try
{
m_count
=
dynamic_cast
<
acquisition
::
Count
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
m_countSpy
->
countControllerName
()));
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
name
<<
" missing controller "
<<
m_countSpy
->
countControllerName
()
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
src/controllers/lss/remotelsssimulation/RemoteLSSSimulation.cpp
View file @
6092e4c1
...
...
@@ -404,7 +404,7 @@ bool RemoteLSSSimulation::initSimulate() {
return
false
;
}
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller "
<<
m_countSpy
->
countControllerName
()
<<
" in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -656,7 +656,7 @@ void RemoteLSSSimulation::getData() {
axis
::
AxisController
*
det
=
dynamic_cast
<
axis
::
AxisController
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
"Det"
));
//jsonWriter.Double(det->position());
jsonWriter
.
Double
(
8.0
);
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller Det in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -672,7 +672,7 @@ void RemoteLSSSimulation::getData() {
try
{
axis
::
AxisController
*
det1
=
dynamic_cast
<
axis
::
AxisController
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
"Det1"
));
jsonWriter
.
Double
(
det1
->
position
());
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller Det1 in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -688,7 +688,7 @@ void RemoteLSSSimulation::getData() {
try
{
axis
::
AxisController
*
det2
=
dynamic_cast
<
axis
::
AxisController
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
"Det2"
));
jsonWriter
.
Double
(
det2
->
position
());
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller Det2 in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -704,7 +704,7 @@ void RemoteLSSSimulation::getData() {
// axis::AxisController* bx =
// dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("Bx"));
// jsonWriter.Double(bx->position());
// } catch (InstrumentManager::
ControllerNotFound
& e) {
// } catch (InstrumentManager::
InstrumentManagerError
& e) {
// log(Level::s_Error) << " missing controller Bx in this instrument" << endlog;
//// commandStatus.setError();
//// commandProgression = 100;
...
...
@@ -719,7 +719,7 @@ void RemoteLSSSimulation::getData() {
// axis::AxisController* by =
// dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("By"));
// jsonWriter.Double(by->position());
// } catch (InstrumentManager::
ControllerNotFound
& e) {
// } catch (InstrumentManager::
InstrumentManagerError
& e) {
//// log(Level::s_Error) << " missing controller By in this instrument" << endlog;
//// commandStatus.setError();
//// commandProgression = 100;
...
...
@@ -734,7 +734,7 @@ void RemoteLSSSimulation::getData() {
try
{
stateio
::
AttenuatorController
*
attenuator
=
dynamic_cast
<
stateio
::
AttenuatorController
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
"Attenuator"
));
jsonWriter
.
Double
(
attenuator
->
attenuationCoefficient
());
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller Attenuator in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -754,7 +754,7 @@ void RemoteLSSSimulation::getData() {
jsonWriter
.
Double
(
1.0
);
}
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller Attenuator in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -776,7 +776,7 @@ void RemoteLSSSimulation::getData() {
// return;
jsonWriter
.
Double
(
1.0
);
}
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller Attenuator in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -1129,7 +1129,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det
->
detSum
.
update
(
sum
);
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller MultiDetector2 in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -1152,7 +1152,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det
->
detSum
.
update
(
sum
);
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller MultiDetector3 in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -1175,7 +1175,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det
->
detSum
.
update
(
sum
);
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller MultiDetector4 in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
@@ -1198,7 +1198,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det
->
detSum
.
update
(
sum
);
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
}
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" missing controller MultiDetector5 in this instrument"
<<
endlog
;
commandStatus
.
setError
();
commandProgression
=
100
;
...
...
src/controllers/remotemcstas/RemoteMcStas.cpp
View file @
6092e4c1
...
...
@@ -653,7 +653,7 @@ void RemoteMcStas::updateData(const sim_result& result) {
try
{
count
=
dynamic_cast
<
acquisition
::
Count
*>
(
InstrumentManager
::
getInstance
()
->
getExperimentController
(
m_countSpy
->
countControllerName
()));
}
catch
(
InstrumentManager
::
ControllerNotFound
&
e
)
{
catch
(
InstrumentManager
::
InstrumentManagerError
&
e
)
{
log
(
Level
::
s_Error
)
<<
" Count controller is missing"
<<
endlog
;
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment