Cangetportstatus() – ADLINK PCI-7841/cPCI-7841 User Manual

Page 42

Advertising
background image

34

Function Reference

Parameters

handle : handle retrieve from CanOpen-
Driver()
value : a byte value

Return Value

None

Remarks

This function set the current of the transmit
error counter.
Please see the remark of CanGetTxError-
Count().

See Also

CanRcvMsg()

Usage

C/C++

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

0 of card 0

….
CanSetTxErrorCount(handle, 0);
CanCloseDriver(handle);

CanGetPortStatus()

Purpose

Get Port Status

Prototype

C/C++
int CanGetPortStatus(int handle,
PORT_STATUS *PortStatus)

Parameters

handle : handle retrieve from CanOpen-
Driver()
PortStatus : Pointer of PORT_STATUS
structure

Return Value

No Error: 0
Error: -1

Remarks

Get Port Status(See the structure define for
detailed description)

See Also
Usage

C/C++

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

0 of card 0

CanGetPortStatus(&port_status);
CanClearOverrun();

Advertising