Kvaser CANLIB: Obsolete API Reference
Data Structures | Defines | Typedefs | Functions

Obsolete API Reference

Data Structures

struct  tagCanHWDescr
struct  tagCanSWDescr

Defines

#define canCIRCUIT_ANY   -1
#define canCARD_ANY   -1
#define canCHANNEL_ANY   -1
#define CANID_METAMSG   (-1L)
#define CANID_WILDCARD   (-2L)
#define canSTAT_INACTIVE   canSTAT_RESERVED_1

Typedefs

typedef void *(* canMemoryAllocator )(size_t size)
typedef void(* canMemoryDeallocator )(void *p)
typedef struct tagCanHWDescr canHWDescr
typedef struct tagCanSWDescr canSWDescr

Functions

canStatus canLocateHardware (void)
int canOpen (const canHWDescr *const hwdescr, const canSWDescr *const swdescr, const unsigned int flags)
canStatus canGetCircuits (int *context, char *name, char *vendor, char *version, unsigned int *cardtype, unsigned int *circtype, unsigned int *channel)
canStatus canInstallAction (int handle, long id, int(*fn)())
canStatus canUninstallAction (int handle, long id)
canStatus canInstallOwnBuffer (int handle, long id, unsigned int len, void *buf)
canStatus canUninstallOwnBuffer (int handle, long id)

Some obsolete codes; they are not used nowadays.

Warning:
Obsolete!

#define canERR_BUFOFL   canERR_RESERVED_3
#define canERR_REINIT   canERR_RESERVED_4
#define canERR_MSGLOST   canERR_RESERVED_5
#define canERR_OVERRUN   canERR_RESERVED_6
#define canERR_CARDCOMMFAILED   canERR_RESERVED_7

Circuit status flags, retained for compatibility

Warning:
Obsolete!

#define canCIRCSTAT_ERROR_PASSIVE   0x0001
#define canCIRCSTAT_BUS_OFF   0x0002
#define canCIRCSTAT_ERROR_WARNING   0x0004

Sticky status flags

Warning:
Obsolete!

#define canSTICKY_ACK_ERROR   0x80000801
#define canSTICKY_FORM_ERROR   0x80000002
#define canSTICKY_STUFF_ERROR   0x80000004
#define canSTICKY_CRC_ERROR   0x80000008
#define canSTICKY_BIT0_ERROR   0x80000010
#define canSTICKY_BIT1_ERROR   0x80000020
#define canSTICKY_HW_OVERRUN   0x80000040
#define canSTICKY_SW_OVERRUN   0x80000080

Flags for canOpen

Warning:
Obsolete! Use canOPEN_xxx instead.

#define canWANT_ACTIONS   0x01
#define canWANT_OWN_BUFFERS   0x02
#define canWANT_ERROR_COUNTERS   0x04
#define canWANT_EXCLUSIVE   0x08
#define canWANT_EXTENDED   0x10
#define canWANT_VIRTUAL   0x20

Circuit types.

Warning:
Obsolete!

#define PCCAN_PHILIPS   1
#define PCCAN_INTEL526   2
#define PCCAN_INTEL527   3
#define CANCARD_NEC72005   4
#define CIRC_VIRTUAL   5
#define CIRC_SJA1000   6

Card types.

Warning:
Obsolete!

#define canCARD_PCCAN   1
#define canCARD_CANCARD   2
#define canCARD_AC2   3
#define canCARD_LAPCAN   4
#define canCARD_ISACAN   5
#define canCARD_PCCAN_OEM   6

The canFlgXXX are left for compatibility.

Warning:
Obsolete!

#define canFlgACCEPT   1
#define canFlgREJECT   2
#define canFlgCODE   3
#define canFlgMASK   4

Flags for action routines

Warning:
Obsolete!

#define canDISCARD_MESSAGE   3
#define canRETAIN_MESSAGE   4

For busParams - sync on rising edge only or both rising and falling edge

(Not supported)

Warning:
Obsolete!

#define canSLOW_MODE   0x01

CAN driver types; these constants are retained for compatibility.

(Not supported)

Warning:
Obsolete!

#define canOFF   0
#define canTRISTATE   1
#define canPULLUP   2
#define canPULLDOWN   3
#define canPUSHPULL   4
#define canINVPULLUP   5
#define canINVPULLDOWN   6
#define canINVPUSHPULL   7

These were never implemented.

(Not supported)

Warning:
Obsolete!

#define canIOCTL_LOCAL_ECHO_ON   3
#define canIOCTL_LOCAL_ECHO_OFF   4
#define canMSG_STATUS   0x0008

Define Documentation

#define canCARD_AC2   3

CAN-AC2 (Softing)

Warning:
Obsolete!
#define canCARD_ANY   -1

Any card will do.

Warning:
Obsolete!
#define canCARD_CANCARD   2

CANCard (Softing)

Warning:
Obsolete!
#define canCARD_ISACAN   5
Warning:
Obsolete!
#define canCARD_LAPCAN   4
Warning:
Obsolete!
#define CANCARD_NEC72005   4

NEC72005 on CANCard.

Warning:
Obsolete!
#define canCARD_PCCAN   1

PCCAN ver 1.x (KVASER)

Warning:
Obsolete!
#define canCARD_PCCAN_OEM   6

Special for OEM PCcan cards.

Warning:
Obsolete!
#define canCHANNEL_ANY   -1

Any channel will do.

Warning:
Obsolete!
#define canCIRCSTAT_BUS_OFF   0x0002

Bus off.

Warning:
Obsolete!
#define canCIRCSTAT_ERROR_PASSIVE   0x0001

Error passive.

Warning:
Obsolete!
#define canCIRCSTAT_ERROR_WARNING   0x0004

Error counter > 96.

Warning:
Obsolete!
#define canCIRCUIT_ANY   -1

Any circuit will do.

Warning:
Obsolete!
#define canDISCARD_MESSAGE   3
Warning:
Obsolete!
#define canERR_BUFOFL   canERR_RESERVED_3

"Buffer overflow"

Warning:
Obsolete!
#define canERR_CARDCOMMFAILED   canERR_RESERVED_7

"Can't communicate with the card"

Warning:
Obsolete!
#define canERR_MSGLOST   canERR_RESERVED_5

"Message lost by CAN-chip"

Warning:
Obsolete!
#define canERR_OVERRUN   canERR_RESERVED_6

"Receive buffer overrun"

Warning:
Obsolete!
#define canERR_REINIT   canERR_RESERVED_4

"Reinitialization failed"

Warning:
Obsolete!
#define canFlgACCEPT   1
Warning:
Obsolete!
#define canFlgCODE   3
Warning:
Obsolete!
#define canFlgMASK   4
Warning:
Obsolete!
#define canFlgREJECT   2
Warning:
Obsolete!
#define CANID_METAMSG   (-1L)

Like msgs containing bus status changes.

Warning:
Obsolete!
#define CANID_WILDCARD   (-2L)

We don't care or don't know.

Warning:
Obsolete!
#define canINVPULLDOWN   6
Warning:
Obsolete!
#define canINVPULLUP   5
Warning:
Obsolete!
#define canINVPUSHPULL   7
Warning:
Obsolete!
#define canIOCTL_LOCAL_ECHO_OFF   4
Warning:
Obsolete!
#define canIOCTL_LOCAL_ECHO_ON   3
Warning:
Obsolete!
#define canMSG_STATUS   0x0008
Warning:
Obsolete!
#define canOFF   0
Warning:
Obsolete!
#define canPULLDOWN   3
Warning:
Obsolete!
#define canPULLUP   2
Warning:
Obsolete!
#define canPUSHPULL   4

This is the usual setting.

Warning:
Obsolete!
#define canRETAIN_MESSAGE   4
Warning:
Obsolete!
#define canSLOW_MODE   0x01

Sync on rising and falling edge.

Warning:
Obsolete!
#define canSTAT_INACTIVE   canSTAT_RESERVED_1

The circuit is not active (removed from the sw bus)

Warning:
Obsolete!
#define canSTICKY_ACK_ERROR   0x80000801
Warning:
Obsolete!
#define canSTICKY_BIT0_ERROR   0x80000010
Warning:
Obsolete!
#define canSTICKY_BIT1_ERROR   0x80000020
Warning:
Obsolete!
#define canSTICKY_CRC_ERROR   0x80000008
Warning:
Obsolete!
#define canSTICKY_FORM_ERROR   0x80000002
Warning:
Obsolete!
#define canSTICKY_HW_OVERRUN   0x80000040
Warning:
Obsolete!
#define canSTICKY_STUFF_ERROR   0x80000004
Warning:
Obsolete!
#define canSTICKY_SW_OVERRUN   0x80000080
Warning:
Obsolete!
#define canTRISTATE   1
Warning:
Obsolete!
#define canWANT_ACTIONS   0x01
Warning:
Obsolete!
#define canWANT_ERROR_COUNTERS   0x04
Warning:
Obsolete!
#define canWANT_EXCLUSIVE   0x08
Warning:
Obsolete! Use canOPEN_xxx instead.
#define canWANT_EXTENDED   0x10
Warning:
Obsolete! Use canOPEN_xxx instead.
#define canWANT_OWN_BUFFERS   0x02
Warning:
Obsolete!
#define canWANT_VIRTUAL   0x20
Warning:
Obsolete! Use canOPEN_xxx instead.
#define CIRC_SJA1000   6
Warning:
Obsolete!
#define CIRC_VIRTUAL   5
Warning:
Obsolete!
#define PCCAN_INTEL526   2

Not supported.

Warning:
Obsolete!
#define PCCAN_INTEL527   3

82527 on PCCAN 1.0

Warning:
Obsolete!
#define PCCAN_PHILIPS   1

82C200 on PCCAN 1.0

Warning:
Obsolete!

Typedef Documentation

typedef struct tagCanHWDescr canHWDescr
Warning:
Obsolete!
typedef void*(* canMemoryAllocator)(size_t size)

Retained for compatibility.

Warning:
Obsolete!
typedef void(* canMemoryDeallocator)(void *p)
Warning:
Obsolete!
typedef struct tagCanSWDescr canSWDescr
Warning:
Obsolete!

Function Documentation

canStatus canGetCircuits ( int *  context,
char *  name,
char *  vendor,
char *  version,
unsigned int *  cardtype,
unsigned int *  circtype,
unsigned int *  channel 
)
Warning:
Obsolete!
canStatus canInstallAction ( int  handle,
long  id,
int(*)()  fn 
)
Warning:
Obsolete!
canStatus canInstallOwnBuffer ( int  handle,
long  id,
unsigned int  len,
void *  buf 
)
Warning:
Obsolete!
canStatus canLocateHardware ( void  )
Warning:
Obsolete!
Examples:
kvTimeStampTester.c.
int canOpen ( const canHWDescr *const  hwdescr,
const canSWDescr *const  swdescr,
const unsigned int  flags 
)
Warning:
Obsolete!
canStatus canUninstallAction ( int  handle,
long  id 
)
Warning:
Obsolete!
canStatus canUninstallOwnBuffer ( int  handle,
long  id 
)
Warning:
Obsolete!