write.c File Reference


Functions

__LDDK_WRITE_TYPE can_write (__LDDK_WRITE_PARAM)
 size_t write(int fd, const char *buf, size_t count); write CAN messages to the network

Detailed Description

Author:
Heinz-Jürgen Oertel, port GmbH
Revision
1.3
Date
2007/02/07 15:26:30

Function Documentation

__LDDK_WRITE_TYPE can_write __LDDK_WRITE_PARAM   ) 
 

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.


Generated at Do Feb 8 12:25:17 CET 2007 CAN driver can4linux by port GmbH service@port.de , © 1997-2006