User Tools

Site Tools


tools:logger_trace:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:logger_trace:start [2018/05/25 09:34] – [Concurrent Writing of Trace Data] graftools:logger_trace:start [2018/08/22 11:56] (current) – external edit 127.0.0.1
Line 42: Line 42:
  
 ===== Concurrent Writing of Trace Data ===== ===== Concurrent Writing of Trace Data =====
-The example above shows how a trace buffer can be written to a file. This has to be done only after the executor stopped, because the writing usually takes a long time. If you wish to write a trace buffer to a file for further analysis while the application still runsA trace blockthough it will run by the control system, has to be enabledIf soit will contineously fill its trace buffe+The example above shows how a trace buffer can be written to a file. This has to be done only after the executor stopped, because the writing usually takes a long time. If you wish to write a trace buffer to a file for further analysis while the application still runsyou can use a ''TraceWriter''. This will do the writing in a separate thread and hence does not block the safety system or control system, see ''examples/controlSystem/traceTest''. In this example the trace buffer gets written to a file every 30 seconds. 
 +<code cpp> 
 +  TraceWriter<Vector3> tw(cs.trace2"/tmp/ctrlData"); 
 + 
 +  if (slRunning.getNofActivations() % (int)(30 / period) == 0) { // write to log file every 30s 
 +    tw.write(); 
 +  } 
 +</code> 
 +The name of the trace file will be appended with the current date and time.
tools/logger_trace/start.1527233648.txt.gz · Last modified: 2018/05/25 09:34 by graf