Can Flush Tx Queue
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 canFlushTxQueue(long channel);
Function
Flushes the Tx queue for the defined channel.
Parameters
Channel The CAN channel.
Return Values
0: Interface doesn’t support flush of Tx queue
1: success
-1: error
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.
on key 'f'
{
int result;
//flush Tx queue for CAN channel 1
result = canFlushTxQueue(1);
if(result == 1)
write("Tx queue flushed ");
else
write("Tx queue flush failed Result =%d ", result);
}