I wrote a simple CAPL program to output data to a file.
When executing simulation in offline mode, nothing gets printed on file. I can't test it in online mode. I can't understand why.
Script is put in measurement setup right after the online/offline switch, on the main branch. I'm using CANoe.
/*@!Encoding:1252*/
includes
{
}
variables
{
dword fileHandle;
char buffer[1024];
}
on preStart
{
setFilePath("mypath");
fileHandle = openFileWrite("file.txt", 2);
}
on stopMeasurement
{
fileClose(fileHandle);
}
on linFrame someFrame
{
snprintf(buffer, elcount(buffer), "somestring %d", somevalue);
filePutString(buffer, elcount(buffer), fileHandle);
}