Daemon Painter
Daemon Painter

Reputation: 3500

CAPL get name of log file created

I have a CANoe setup configured to automatically save log files to a folder, using a dynamic naming convention (that is: output file name has date and time, and they are not a constant).

I'd like to perform some actions on this file after it is saved, using the on Stop() procedure of a CAPL script. To be sure of targetting the correct log file, I'd like to use its name, which is dynamically created (this is a constraint). How can I do this?

Upvotes: 0

Views: 2525

Answers (1)

Shyam
Shyam

Reputation: 682

If triggering a post-processing script is an option, using COM interface is the best bet. Follow these steps:

  • When the measurement is completed, you can trigger a script using the "Actions" feature.
  • This script should read the logging file name.
  • The name which is returned by the COM object is the last saved file name.

eg. App.Configuration.OnlineSetup.LoggingCollection.Item(1).FullName
Note that the index values for Item object starts from 1 (not from 0).

Upvotes: 2

Related Questions