Main Page   Data Structures   File List   Data Fields   Globals  

can_write.c File Reference

More...


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. More...


Detailed Description

Author(s):
Heinz-Jürgen Oertel, port GmbH
Revision:
1.3
Date:
2001/09/04 15:51:44


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.

For internal use only.


Generated at Fre Sep 14 16:40:18 CEST 2001 CAN driver can4linux by port GmbH service@port.de , © 1997-2001