CAPL Script

WriteDbgLevel

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

long writeDbgLevel(unsigned int priority, char format1[], char format2[], ...);

Function

Outputs a message to the Write Window with the specified priority. This function can be used for debugging to vary the output to the Write Window. This function is especially useful if nodelayer-DLL’s are used. In this case the debug output can be controlled using a global priority parameter. In the simulation tree the priority level can be set for every network node using thesetWriteDbgLevelfunction.

Parameters

priority Output priority from 0 to 15.

format

Format string, variables or expressions legal format expressions:

Return Values

—

Reference example from the CANoe 12 help. Check the required configuration, database objects and API availability in your installed version; this is not a recorded compiler or runtime test.

int i = 10;
int j = 12;
setWriteDbgLevel(7);
writeDbgLevel (4, "This is shown: h= %lxh",j);
 // Output: This is shown: h= 0ch
writeDbgLevel (9, "This is not shown: d= %ld",i);
 // No output

setWriteDbgLevel | write | writeDbgLevel