Can-layer status functions, Canclearoverrun(), Can-layer status functions canclearoverrun() – ADLINK PCI-7841/cPCI-7841 User Manual

Page 35

Advertising
background image

Function Reference

27

card to memory. It starts after your port con-
figuration is done. This function copies the
buffer to your application. So if your pro-
gram has the critical section to process the
data on the network. We suggest that you
can call the CanClearBuffer() to clear the
buffer first. Error would be happened most
under the following conditions:
1. You want to access a port that has not be
opened.
2. Your packet is a NULL pointer.
3. The receive buffer is empty.
You can use the Status handling functions
to handle the exceptions.

See Also

CanSendMsg()

Usage

See the CanSendMsg()

CAN-layer Status Functions

CanClearOverrun()

Purpose

Clear data overrun status

Prototype

C/C++
void CanClearOverrun(int handle)

Parameters

handle : handle retrieve from CanOpen-
Driver()

Return Value

none

Remarks

Clear the data overrun status
Sometimes if your system has heavy load,
and the bus is busy. The data overrun
would be signalled. A Data Overrun signals,
that data are lost, possibly causing incon-
sistencies in the system.

See Also

CanRcvMsg()

Usage

C/C++

#include “pci7841.h
int handle = CanOpenDriver(0, 0);//open the port

0 of card 0

Advertising