Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph
Commits
e34bd06d
Commit
e34bd06d
authored
Feb 25, 2020
by
Joseph Mirabel
Browse files
Update tests/debug-real-time-tracer.cpp
parent
d9dc152e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/debug-real-time-tracer.cpp
View file @
e34bd06d
...
...
@@ -66,36 +66,37 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
std
::
string
suffix
(
".dat"
);
/// Test openfiles
atracer
.
setBufferSize
(
1
<<
14
);
atracer
.
openFiles
(
rootdir
,
basename
,
suffix
);
/// Add trace by name
atracer
.
addSignalToTraceByName
(
"my-entity.out_double"
,
"output"
);
/// Add trace by name
SignalBase
<
int
>
&
aSignal
=
entity
.
getSignal
(
"out2double"
);
SignalBase
<
int
>
&
out_double
=
entity
.
getSignal
(
"out_double"
);
SignalBase
<
int
>
&
out_double_2
=
entity
.
getSignal
(
"out2double"
);
entity
.
m_sigdTwoTimeDepSOUT
.
recompute
(
2
);
Signal
<
double
,
int
>
&
aSignalInt
=
Signal
<
double
,
int
>
&
in_double
=
*
(
dynamic_cast
<
Signal
<
double
,
int
>
*>
(
&
entity
.
getSignal
(
"in_double"
)));
aSignalInt
.
setConstant
(
1.5
);
in_double
.
setConstant
(
1.5
);
atracer
.
start
();
atracer
.
trace
();
std
::
string
emptybuf_cmd_str
(
"empty"
);
command
::
Command
*
acmd
=
atracer
.
getNewStyleCommand
(
emptybuf_cmd_str
);
acmd
->
execute
();
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
aSignal
.
setTime
(
i
);
aSignalInt
.
setTime
(
i
);
in_double
.
setTime
(
i
);
out_double
.
recompute
(
i
);
out_double_2
.
recompute
(
i
);
atracer
.
recordTrigger
(
i
,
i
);
}
output_test_stream
output
;
atracer
.
display
(
output
);
atracer
.
stop
();
atracer
.
trace
();
atracer
.
clearSignalToTrace
();
atracer
.
closeFiles
();
acmd
->
execute
();
...
...
@@ -105,5 +106,5 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
"TracerRealTime my-tracer [mode=play] :
\n
"
" - Dep list:
\n
"
" -> MyEntity(my-entity)::input(double)::out_double (in output)"
" [
0M
o/1
M
o]
\n
"
));
" [
9K
o/1
6K
o]
\n
"
));
}
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