⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 can_read.c.3

📁 can4linux.3.4.6.gz,一个CAN的高级协议包装
💻 3
字号:
.TH "can_read.c" 3 "18 Oct 2005" "can4linux" \" -*- nroff -*-.ad l.nh.SH NAMEcan_read.c \- .SH SYNOPSIS.br.PP.SS "Functions".in +1c.ti -1c.RI "size_t \fBcan_read\fP (__LDDK_READ_PARAM)".br.RI "\fIssize_t read(int fd, void *buf, size_t count); the read system call \fP".in -1c.SH "Detailed Description".PP \fBAuthor:\fP.RS 4Heinz-J黵gen Oertel, port GmbH .PP\fBRevision\fP.RS 41.8 .RE.PP\fBDate\fP.RS 42005/08/29 08:58:20 .RE.PP.RE.PPModule Description see Doxygen Doc for all possibilities.SH "Function Documentation".PP .SS "size_t can_read (__LDDK_READ_PARAM)".PPssize_t read(int fd, void *buf, size_t count); the read system call .PP\fBParameters:\fP.RS 4\fIfd\fP The descriptor to read from. .br\fIbuf\fP The destination data buffer (array of CAN \fBcanmsg_t\fP). .br\fIcount\fP The number of bytes to read..RE.PPread() attempts to read up to \fIcount\fP CAN messages from file descriptor fd into the buffer starting at buf. buf must be large enough to hold count times the size of one CAN message structure \fB\fBcanmsg_t\fP\fP..PP.PP.nfint got;canmsg_t rx[80];                        // receive buffer for read()    got = read(can_fd, rx , 80 );    if( got > 0) {      ...    } else {        // read returned with error        fprintf(stderr, '- Received got = %d\n', got);        fflush(stderr);    }.fi.PP.PP\fBERRORS\fP.RS 4.RE.PPthe following errors can occur.PP.PD 0.IP "\(bu" 2\fCEINVAL\fP \fBbuf\fP points not to an large enough area,.PP\fBReturns:\fP.RS 4On success, the number of bytes read is returned (zero indicates end of file). It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now, or because read() was interrupted by a signal. On error, -1 is returned, and errno is set appropriately..RE.PP.SH "Author".PP Generated automatically by Doxygen for can4linux from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -