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
8f0decf4
Commit
8f0decf4
authored
Jun 14, 2022
by
legoc
Browse files
Some cameo related code
parent
70857ad2
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
8f0decf4
...
...
@@ -6,3 +6,4 @@
/INSTALL
/Makefile.in
.settings/
/configure~
\ No newline at end of file
src/controllers/gpcamcom/GpCamComSlave.cpp
View file @
8f0decf4
...
...
@@ -130,6 +130,8 @@ void GpCamComSlave::postConfiguration() {
else
{
m_gpCAMServer
=
Server
::
create
(
gpCAMServerEndpoint
(),
1000
);
}
m_gpCAMServer
->
init
();
}
// Create the responder.
...
...
@@ -183,7 +185,8 @@ bool GpCamComSlave::initApplication() {
// We start the app.
try
{
m_gpCAMApplication
=
m_gpCAMServer
->
start
(
GPCAM_APPLICATION
);
}
catch
(...)
{
}
catch
(
const
StartException
&
e
)
{
cout
<<
"No remote application"
<<
endl
;
return
false
;
}
...
...
@@ -384,7 +387,7 @@ void GpCamComSlave::start() {
unique_ptr
<
coms
::
basic
::
Request
>
request
=
m_responder
->
receive
();
// The responder is canceled.
if
(
request
.
get
()
==
nullptr
)
{
if
(
!
request
)
{
loopStatus
=
IDLE
;
// Reset the mode.
return
;
...
...
@@ -524,13 +527,7 @@ void GpCamComSlave::start() {
}
loopStatus
=
REPLYING
;
request
->
setTimeout
(
10000
);
if
(
!
request
->
reply
(
response
))
{
cout
<<
"Timeout while replying to gpCAM"
<<
endl
;
error
=
true
;
break
;
}
request
->
reply
(
response
);
cout
<<
"Replied "
<<
response
<<
endl
;
}
...
...
src/controllers/lss/autoconfig/LssAutoConfig.cpp
View file @
8f0decf4
...
...
@@ -236,9 +236,10 @@ bool LssAutoConfig::initApplication() {
cout
<<
"Terminated remote application with state "
<<
cameo
::
toString
(
state
)
<<
endl
;
}
m_remoteApplication
=
m_server
->
start
(
REMOTE_APPLICATION
);
if
(
m_remoteApplication
->
getActualState
()
!=
cameo
::
RUNNING
)
{
try
{
m_remoteApplication
=
m_server
->
start
(
REMOTE_APPLICATION
);
}
catch
(
const
StartException
&
e
)
{
cout
<<
"No remote application"
<<
endl
;
return
false
;
}
...
...
src/controllers/lss/remotelsssimulation/RemoteLSSSimulation.cpp
View file @
8f0decf4
...
...
@@ -369,12 +369,13 @@ bool RemoteLSSSimulation::initApplication() {
m_matlabApplication
=
m_server
->
connect
(
MATLAB_APPLICATION
);
if
(
m_matlabApplication
->
getActualState
()
!=
cameo
::
RUNNING
)
{
m_matlabApplication
=
m_server
->
start
(
MATLAB_APPLICATION
);
if
(
m_matlabApplication
->
getActualState
()
!=
cameo
::
RUNNING
)
{
try
{
m_matlabApplication
=
m_server
->
start
(
MATLAB_APPLICATION
);
}
catch
(
const
StartException
&
e
)
{
cout
<<
"No matlab application"
<<
endl
;
return
false
;
}
applicationState
=
m_matlabApplication
->
waitFor
(
cameo
::
STARTING
);
}
// First delete the requester if it exists.
...
...
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