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
0cbafe19
Commit
0cbafe19
authored
Aug 12, 2016
by
yannick legoc
Browse files
added test command to DielectricsMatlab
parent
2177b9e6
Changes
2
Show whitespace changes
Inline
Side-by-side
src/controllers/remotedielectrics/DielectricsRemoteMatlabReq.cpp
View file @
0cbafe19
...
...
@@ -45,7 +45,7 @@ const std::string RemoteMatlabReq::RUN_SPECTRUMS_TIME = "Run Spectrums Time";
const
std
::
string
RemoteMatlabReq
::
RUN_SINGLE_FREQUENCY
=
"Run Single Frequency"
;
RemoteMatlabReq
::
RemoteMatlabReq
(
const
std
::
string
&
name
)
:
ExperimentController
(
name
),
controller
::
Start
(
this
),
controller
::
Raz
(
this
)
{
ExperimentController
(
name
),
controller
::
Start
(
this
),
controller
::
Raz
(
this
)
,
Test
(
this
)
{
setFamily
(
family
::
ACQUISITION
);
...
...
@@ -89,7 +89,7 @@ RemoteMatlabReq::RemoteMatlabReq(const std::string& name) :
}
RemoteMatlabReq
::
RemoteMatlabReq
(
const
RemoteMatlabReq
&
controller
)
:
ExperimentController
(
controller
),
controller
::
Start
(
this
),
controller
::
Raz
(
this
)
{
ExperimentController
(
controller
),
controller
::
Start
(
this
),
controller
::
Raz
(
this
)
,
Test
(
this
)
{
}
RemoteMatlabReq
::~
RemoteMatlabReq
()
{
...
...
@@ -256,6 +256,14 @@ void RemoteMatlabReq::raz() {
initialized
=
false
;
}
void
RemoteMatlabReq
::
test
()
{
for
(
int
i
=
0
;
i
<
100
;
++
i
)
{
raz
();
initApplication
();
}
}
void
RemoteMatlabReq
::
stopRun
()
{
auto_ptr
<
cameo
::
application
::
Instance
>
matlabStopApplication
=
m_server
->
start
(
MATLAB_STOP_APPLICATION
);
...
...
src/controllers/remotedielectrics/DielectricsRemoteMatlabReq.h
View file @
0cbafe19
...
...
@@ -24,9 +24,26 @@
namespace
dielectrics
{
/*!
* \brief Test command.
*/
class
Test
:
private
controller
::
Command
{
public:
Test
(
ExperimentController
*
c
)
:
controller
::
Command
(
c
,
"test"
,
&
Test
::
test
,
this
)
{
}
virtual
void
test
()
=
0
;
void
testCommand
(
bool
logging
=
false
)
{
command
(
logging
,
true
);
}
};
class
RemoteMatlabReq
:
public
ExperimentController
,
public
controller
::
Start
,
public
controller
::
Raz
{
public
controller
::
Raz
,
public
Test
{
public:
//! Type of controller
...
...
@@ -40,6 +57,7 @@ public:
virtual
void
start
();
virtual
void
raz
();
virtual
void
test
();
void
stopRun
();
...
...
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