linux

canWriteSync

Syntax


#include <canlib.h>
canStatus canWriteSync(int handle, unsigned long timeout);

Description

Waits until all CAN messages for the specified handle are sent, or the timeout period expires.

Input Parameters

handle
A handle to an open CAN circuit.
timeout
The timeout in milliseconds.
Output Parameters

None.

Return Value

canOK (zero) if the queue emptied before the timeout period came to its end.
canERR_TIMEOUT (negative) not all messages were transmitted when the timeout occurred.
canERR_xxx (negative) if failure.

Related Topics

canWrite