Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
3d2eb7d2
Commit
3d2eb7d2
authored
Jun 20, 2016
by
yannick legoc
Browse files
Removed log of Matlab for live events
parent
5992d47d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/controllers/remotetas/RemoteMatlab.cpp
View file @
3d2eb7d2
...
...
@@ -23,6 +23,7 @@
#include
<fstream>
#include
<iostream>
#include
<common/base/ServerProperties.h>
#include
"controllers/common/family/Families.h"
#include
"RemoteMatlab.h"
namespace
tas
{
...
...
@@ -38,6 +39,8 @@ RemoteMatlab::RemoteMatlab(const std::string& name) :
utilities
::
ImageData
(
name
),
controller
::
Start
(
this
)
{
setFamily
(
family
::
ACQUISITION
);
serverEndpoint
.
init
(
this
,
SAVE
,
"cameo_server"
);
initialized
.
init
(
this
,
NOSAVE
,
"initialized"
);
test
.
init
(
this
,
SAVE
,
"test"
);
...
...
src/controllers/remotetas/RemoteMatlabPub.cpp
View file @
3d2eb7d2
...
...
@@ -96,7 +96,7 @@ bool RemoteMatlabPub::initApplication() {
try
{
// Start the Matlab server
if
(
!
m_server
->
isAvailable
(
1000
))
{
if
(
!
m_server
->
isAvailable
(
1000
0
))
{
cout
<<
"Matlab server is not available"
<<
endl
;
return
false
;
}
...
...
@@ -194,12 +194,14 @@ void RemoteMatlabPub::sendNumor(int32 numor, bool live) {
}
LogStream
logStream
=
log
(
Level
::
s_Info
).
property
(
scanController
->
logAcquisitionType
)
.
property
(
scanController
->
logNumor
)
.
property
(
scanController
->
log
Subtitl
e
)
;
logStream
<<
numorName
<<
" in Q"
<<
image
(
numor
,
"q"
)
<<
endlog
;
// Not log when the calculation is for live process.
if
(
!
live
)
{
LogStream
logStream
=
log
(
Level
::
s_Info
)
.
property
(
scanController
->
log
AcquisitionTyp
e
)
.
property
(
scanController
->
logNumor
)
.
property
(
scanController
->
logSubtitle
)
;
logStream
<<
numorName
<<
" in Q"
<<
image
(
numor
,
"q"
)
<<
endlog
;
}
string
numorFileName
(
common
::
ServerProperties
::
getInstance
()
->
getNomadDataPath
());
numorFileName
+=
numorName
;
...
...
@@ -234,7 +236,7 @@ void RemoteMatlabPub::sendNumor(int32 numor, bool live) {
// Publish the message
m_publisher
->
sendBinary
(
request
.
SerializeAsString
());
cout
<<
getName
()
<<
" sent numor "
<<
numor
<<
endl
;
cout
<<
getName
()
<<
" sent numor "
<<
numor
<<
" for live ? "
<<
live
<<
endl
;
}
void
RemoteMatlabPub
::
start
()
{
...
...
src/controllers/remotetas/RemoteMatlabReq.cpp
View file @
3d2eb7d2
...
...
@@ -90,7 +90,7 @@ bool RemoteMatlabReq::initApplication() {
try
{
// Start the Matlab server
if
(
!
m_server
->
isAvailable
(
1000
))
{
if
(
!
m_server
->
isAvailable
(
1000
0
))
{
cout
<<
"Matlab server is not available"
<<
endl
;
return
false
;
}
...
...
@@ -179,13 +179,14 @@ void RemoteMatlabReq::sendNumor(int32 numor, bool live) {
numorName
=
prefix
+
numorName
;
}
// Not log when the calculation is for live process.
if
(
!
live
)
{
LogStream
logStream
=
log
(
Level
::
s_Info
).
property
(
scanController
->
logAcquisitionType
)
.
property
(
scanController
->
logNumor
)
.
property
(
scanController
->
logSubtitle
);
LogStream
logStream
=
log
(
Level
::
s_Info
).
property
(
scanController
->
logAcquisitionType
)
.
property
(
scanController
->
logNumor
)
.
property
(
scanController
->
logSubtitle
);
logStream
<<
numorName
<<
" in Q"
<<
image
(
numor
,
"q"
)
<<
endlog
;
logStream
<<
numorName
<<
" in Q"
<<
image
(
numor
,
"q"
)
<<
endlog
;
}
string
numorFileName
(
ServerProperties
::
getInstance
()
->
getNomadDataPath
());
numorFileName
+=
numorName
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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