Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
dynamic-graph
Commits
77bd7357
Commit
77bd7357
authored
5 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
Improve doc.
Fix debug-tracer.cpp
parent
7002bb1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#6400
passed with warnings
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/additionalDoc/tracerdoc.h
+8
-15
8 additions, 15 deletions
doc/additionalDoc/tracerdoc.h
tests/debug-tracer.cpp
+10
-8
10 additions, 8 deletions
tests/debug-tracer.cpp
with
18 additions
and
23 deletions
doc/additionalDoc/tracerdoc.h
+
8
−
15
View file @
77bd7357
...
...
@@ -23,22 +23,15 @@ code documentation of the dynamicgraph::Tracer class.
\n\n
\section tracerdoc_sample Sample usage
The following code creates a TracerRealTime entity
, then
sets the tracing buffer
size to
1
0MB. It then tells the tracer to create files with names of the form:
jl
_XXX.dat where XXX is the signal name, and
adds a few signals after
clearing the traces;
The following code creates a TracerRealTime entity
and
sets the tracing buffer
size to
8
0MB. It then tells the tracer to create files with names of the form:
/tmp/dg
_XXX.dat where XXX is the signal name, and
call the signal
after the device has evaluated the control law:
\code
new TracerRealTime tr
tr.bufferSize 10485760
tr.open ${TRACE_REPOSITORY} jl_ .dat
OpenHRP.periodicCall addSignal tr.triger
(...)
# --- TRACE ---
tr.clear
tr.add OpenHRP.forceRARM
tr.add dyn.0
tr.add jgain.gain
robot.tracer = TracerRealTime("com_tracer")
robot.tracer.setBufferSize(80*(2**20))
robot.tracer.open('/tmp','dg_','.dat')
robot.device.after.addSignal('{0}.triger'.format(robot.tracer.name))
\endcode
\section tracerdoc_addi Additional information
...
...
This diff is collapsed.
Click to expand it.
tests/debug-tracer.cpp
+
10
−
8
View file @
77bd7357
...
...
@@ -66,6 +66,13 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
*
dynamicgraph
::
FactoryStorage
::
getInstance
()
->
newEntity
(
"MyEntity"
,
"my-entity"
);
std
::
string
rootdir
(
"/tmp"
);
std
::
string
basename
(
"my-tracer"
);
std
::
string
suffix
(
".dat"
);
/// Test openfiles
atracer
.
openFiles
(
rootdir
,
basename
,
suffix
);
/// Add trace by name
atracer
.
addSignalToTraceByName
(
"my-entity.out_double"
,
"output"
);
...
...
@@ -80,13 +87,6 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
aSignalInt
.
setConstant
(
1.5
);
std
::
string
rootdir
(
"/tmp"
);
std
::
string
basename
(
"my-tracer"
);
std
::
string
suffix
(
".dat"
);
/// Test openfiles
atracer
.
openFiles
(
rootdir
,
basename
,
suffix
);
atracer
.
start
();
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
...
...
@@ -96,6 +96,8 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
}
atracer
.
stop
();
atracer
.
clearSignalToTrace
();
atracer
.
closeFiles
();
atracer
.
record
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment