dynamic-graph  4.1.0-8-gdab7-dirty
Dynamic graph library
Tracer

Description

The Tracer entity monitors a set of signals. With an input change on the entity's [trigger] signal, the tracked signal values are recorded and traced to a file. The behavior of the trace-to-file function can be changed, from printing to a file immediately after recording, to printing out only when asked explicitly.

Commands

The commands that this entity exposes are:

open, close (a file);
add (a signal)
clear (recorded values);
record (signal values)
trace (doesn't do anything)
start, stop (traces)


For more information on the signals exposed by this entity, please check the code documentation of the dynamicgraph::Tracer class.

Sample usage

The following code creates a TracerRealTime entity and sets the tracing buffer size to 80MB. 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:

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))

Additional information

See doxygen documentation for the class dynamicgraph::Tracer

Generated plugin file

tracer.dll or tracer.so.