Reputation: 438
Are there CAPL functions to manage the traces in my configuration? I want to clear a trace when my simulation starts and save it when a procedure ends. For instance:
clearTrace("trace_name");
...
saveTrace("trace_name", "format.xxx");
I have been looking in manuals and the Vector page but I cannot find help about it. If not, it is possible to configure a Test CAPL to save it when finished a test?
Upvotes: 1
Views: 6293
Reputation: 136
If you want to save a trace for every measurement from beginning to end Vector offers a preconfigured option to achieve this. Insert a logging block into your configuration. Double click the logging block and the mode "entire measurement" should be preselected. Optionally double click the logging file and choose the file in your directory. Choose the option "At each start of measurement" to increment the file names of the trace files.
However if you want to start and end logging within CAPL code double click the logging block and choose "toggle trigger" for the mode. Choose "CAPL" for toggle on and toggle off. Use the startLogging and stopLogging functions. In your CAPL node insert an on start event:
on start {
startLogging("LoggingBlockName");
}
and an on preStop event:
on preStop {
stopLogging("LoggingBlockName");
}
I am not sure, but I think that Vector tools automatically stop logging when measurement is stopped. The file names can be incremented by choosing the option in the logging file configuration as explained above. However, if you want to name your logging files individually make use of the
setLogFileName("LoggingBlockName", "filename");
function within CAPL.
Upvotes: 2