|
size_t write(int fd, const char *buf, size_t count); write CAN messages to the network.
-
Parameters:
-
fd |
The descriptor to write to. |
buf |
The data buffer to write (array of CAN canmsg_t). |
count |
The number of bytes to write. |
write writes up to count CAN messages to the CAN controller referenced by the file descriptor fd from the buffer starting at buf.-
Errors
-
the following errors can occur
-
EBADF fd is not a valid file descriptor or is not open for writing.
-
EINVAL fd is attached to an object which is unsuitable for writing.
-
EFAULT buf is outside your accessible address space.
-
EINTR The call was interrupted by a signal before any data was written.
-
Returns:
-
On success, the number of CAN messages written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately.
|