Skip to main content

Documentation Index

Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Open topic with navigation CAPL Functions » General » Function Overview » isOfflineFileActive

isOfflineFileActive

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

long isOfflineFileActive(long index);

Description

Returns whether events of an offline source file are currently replayed, i.e., the start of the source file has been reached but the end of the source file has not yet been reached.

Parameters

  • index: Index of the offline source file.

Return Values

  • -1: If error (e.g., not in offline mode)
  • 0: Start of offline source file not yet reached, or end of offline source file already reached.
  • 1: Start of offline source file reached, but end of offline source file not yet reached.

Example

long isActive;
char buffer[256];
long numFiles;
long i;

numFiles = getNumOfflineFiles();
for (i = 0; i < numFiles; ++i)
{
  getOfflineFileName(i, buffer, 256);
  isActive = isOfflineFileActive(i);
  if (isActive)
  {
    write("Offline file %s is active", buffer);
  }
  else
  {
    write("Offline file %s is inactive", buffer);
  }
}