0

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?

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44
  • What kind of actions do you want to perform? – Shyam Sep 11 '20 at 09:52
  • for instance, copy the file to another location as well. Or, call post-processing scripts on the file. For now, I've restrain myself to using dynamic variables I know, such as measurement start time. In general, I'd like to know if somebody came up with a method or API call that returns the actual file name being used by the Logging block, since this is created at measurement pre-start. – Daemon Painter Sep 11 '20 at 10:21

1 Answers1

1

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

Shyam
  • 649
  • 1
  • 5
  • 20