Macros
canstat.h File Reference
CANlib » Status Codes

Definitions for the CANLIB API. More...

Go to the source code of this file.

## Macros
#define | canTRANSCEIVER_RESNET_NA 0
#define | canTRANSCEIVER_RESNET_MASTER 1
#define | canTRANSCEIVER_RESNET_MASTER_STBY 2
#define | canTRANSCEIVER_RESNET_SLAVE 3
Convenience
#define | CANSTATUS_SUCCESS(X) ((X) == canOK)
#define | CANSTATUS_FAILURE(X) ((X) != canOK)
canEVENT_xxx WM__CANLIB notification codes
Appears in the notification `WM__CANLIB` message.
#define | canEVENT_RX 32000
| when the queue of received CAN messages goes from empty to non-empty More...
#define | canEVENT_TX 32001
| when a CAN message has been transmitted More...
#define | canEVENT_ERROR 32002
| when a CAN bus error is reported by the CAN controller More...
#define | canEVENT_STATUS 32003
| when the CAN controller changes state More...
#define | canEVENT_ENVVAR 32004
| An envvar changed. More...
#define | canEVENT_BUSONOFF 32005
| Bus on/off status changed. More...
canNOTIFY_xxx
These are notification codes used in calls to canSetNotify() and kvSetNotifyCallback(). This can be canNOTIFY_NONE (zero), meaning that no event notification is to occur, or a combination of any of the following constants
#define | canNOTIFY_NONE 0
| Turn notifications off. More...
#define | canNOTIFY_RX 0x0001
| CAN message reception notification. More...
#define | canNOTIFY_TX 0x0002
| CAN message transmission notification. More...
#define | canNOTIFY_ERROR 0x0004
| CAN bus error notification. More...
#define | canNOTIFY_STATUS 0x0008
| CAN chip status change. More...
#define | canNOTIFY_ENVVAR 0x0010
| An environment variable was changed by a script. Note that you will not be notified when an environment variable is updated from the Canlib API. More...
#define | canNOTIFY_BUSONOFF 0x0020
| Notify on bus on/off status changed. More...
canSTAT_xxx
The following circuit status flags are returned by canReadStatus(). Note that more than one flag might be set at any one time. Note Usually both canSTAT_HW_OVERRUN and canSTAT_SW_OVERRUN are set when overrun has occurred. This is because the kernel driver can't see the difference between a software overrun and a hardware overrun. So the code should always test for both types of overrun using the flag.
#define | canSTAT_ERROR_PASSIVE 0x00000001
| The circuit is error passive. More...
#define | canSTAT_BUS_OFF 0x00000002
| The circuit is Off Bus. More...
#define | canSTAT_ERROR_WARNING 0x00000004
| At least one error counter > 96. More...
#define | canSTAT_ERROR_ACTIVE 0x00000008
| The circuit is error active. More...
#define | canSTAT_TX_PENDING 0x00000010
| There are messages pending transmission. More...
#define | canSTAT_RX_PENDING 0x00000020
| There are messages in the receive buffer. More...
#define | canSTAT_RESERVED_1 0x00000040
| The circuit is error passive. More...
#define | canSTAT_TXERR 0x00000080
| There has been at least one TX error. More...
#define | canSTAT_RXERR 0x00000100
| There has been at least one RX error of some sort. More...
#define | canSTAT_HW_OVERRUN 0x00000200
| There has been at least one HW buffer overflow. More...
#define | canSTAT_SW_OVERRUN 0x00000400
| There has been at least one SW buffer overflow. More...
#define | canSTAT_OVERRUN (canSTAT_HW_OVERRUN | canSTAT_SW_OVERRUN)
| For convenience. More...
Message information flags, < 0x100
The following flags can be returned from canRead() et al, or passed to canWrite(). All flags and/or combinations of them are meaningful for received messages. canMSG_RTR, canMSG_STD, canMSG_EXT, canMSG_WAKEUP and canMSG_ERROR_FRAME are meaningful also for transmitted messages. canMSG_SINGLE_SHOT is only for transmission. Note that canMSG_RTR cannot be set for CAN FD messages.
#define | canMSG_MASK 0x00ff
| Used to mask the non-info bits. More...
#define | canMSG_RTR 0x0001
| Message is a remote request. More...
#define | canMSG_STD 0x0002
| Message has a standard ID. More...
#define | canMSG_EXT 0x0004
| Message has an extended ID. More...
#define | canMSG_WAKEUP 0x0008
| Message to be sent / was received in wakeup mode. More...
#define | canMSG_NERR 0x0010
#define | canMSG_ERROR_FRAME 0x0020
| Message is an error frame. More...
#define | canMSG_TXACK 0x0040
| Message is a TX ACK (msg is really sent) More...
#define | canMSG_TXRQ 0x0080
| Message is a TX REQUEST (msg is transfered to the chip) More...
#define | canMSG_DELAY_MSG 0x0100
| Message is NOT sent on the bus. The transmission of messages are delayed. The dlc specifies the delay in milliseconds (1..1000). More...
#define | canMSG_SINGLE_SHOT 0x1000000
| Message is Single Shot, try to send once, no retransmission. This flag can only be used with transmitted messages. More...
#define | canMSG_TXNACK 0x2000000
| Message is a failed Single Shot, message was not sent. This flag is only used with received messages. More...
#define | canMSG_ABL 0x4000000
| Only together with canMSG_TXNACK, Single shot message was not sent because arbitration was lost. This flag is only used with received messages. More...
canFDMSG_xxx
Flags used in the CAN FD protocol. Set canOPEN_CAN_FD in canOpenChannel() to enable the CAN FD protocol.
#define | canFDMSG_MASK 0xff0000
| Obsolete, use canFDMSG_FDF instead. More...
#define | canFDMSG_EDL 0x010000
| Obsolete, use canFDMSG_FDF instead. More...
#define | canFDMSG_FDF 0x010000
| Message is an FD message (CAN FD) More...
#define | canFDMSG_BRS 0x020000
| Message is sent/received with bit rate switch (CAN FD) More...
#define | canFDMSG_ESI 0x040000
| Sender of the message is in error passive mode (CAN FD) More...
Message error flags
Note Not all hardware platforms can detect the difference between hardware overruns and software overruns, so your application should test for both conditions. You can use the symbol canMSGERR_OVERRUN for this purpose.
#define | canMSGERR_MASK 0xff00
| Used to mask the non-error bits. More...
#define | canMSGERR_HW_OVERRUN 0x0200
| HW buffer overrun. More...
#define | canMSGERR_SW_OVERRUN 0x0400
| SW buffer overrun. More...
#define | canMSGERR_STUFF 0x0800
| Stuff error. More...
#define | canMSGERR_FORM 0x1000
| Form error. More...
#define | canMSGERR_CRC 0x2000
| CRC error. More...
#define | canMSGERR_BIT0 0x4000
| Sent dom, read rec. More...
#define | canMSGERR_BIT1 0x8000
| Sent rec, read dom. More...
#define | canMSGERR_OVERRUN 0x0600
| Any overrun condition. More...
#define | canMSGERR_BIT 0xC000
| Any bit error. More...
#define | canMSGERR_BUSERR 0xF800
| Any RX error. More...
canTRANSCEIVER_LINEMODE_xxx
The following values can be used with canSetDriverMode() to set different driver (i.e. transceiver) modes. Use canGetDriverMode() to obtain the current driver mode for a particular CAN channel. Note Not implemented in Linux.
#define | canTRANSCEIVER_LINEMODE_NA 0
| Not Affected/Not available. More...
#define | canTRANSCEIVER_LINEMODE_SWC_SLEEP 4
| SWC Sleep Mode. More...
#define | canTRANSCEIVER_LINEMODE_SWC_NORMAL 5
| SWC Normal Mode. More...
#define | canTRANSCEIVER_LINEMODE_SWC_FAST 6
| SWC High-Speed Mode. More...
#define | canTRANSCEIVER_LINEMODE_SWC_WAKEUP 7
| SWC Wakeup Mode. More...
#define | canTRANSCEIVER_LINEMODE_SLEEP 8
| Sleep mode for those supporting it. More...
#define | canTRANSCEIVER_LINEMODE_NORMAL 9
| Normal mode (the inverse of sleep mode) for those supporting it. More...
#define | canTRANSCEIVER_LINEMODE_STDBY 10
| Standby for those who support it. More...
#define | canTRANSCEIVER_LINEMODE_TT_CAN_H 11
| Truck & Trailer: operating mode single wire using CAN high. More...
#define | canTRANSCEIVER_LINEMODE_TT_CAN_L 12
| Truck & Trailer: operating mode single wire using CAN low. More...
#define | canTRANSCEIVER_LINEMODE_OEM1 13
| Reserved for OEM apps. More...
#define | canTRANSCEIVER_LINEMODE_OEM2 14
| Reserved for OEM apps. More...
#define | canTRANSCEIVER_LINEMODE_OEM3 15
| Reserved for OEM apps. More...
#define | canTRANSCEIVER_LINEMODE_OEM4 16
| Reserved for OEM apps. More...
Transceiver (logical) types
The following constants can be returned from canGetChannelData(), using the canCHANNELDATA_TRANS_TYPE item code. They identify the bus transceiver type for the channel specified in the call to canGetChannelData. Note They indicate a hardware type, but not necessarily a specific circuit or product.
#define | canTRANSCEIVER_TYPE_UNKNOWN 0
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_251 1
| 82c251 More...
#define | canTRANSCEIVER_TYPE_252 2
| 82c252, TJA1053, TJA1054 More...
#define | canTRANSCEIVER_TYPE_DNOPTO 3
| Optoisolated 82C251. More...
#define | canTRANSCEIVER_TYPE_W210 4
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_SWC_PROTO 5
| AU5790 prototype. More...
#define | canTRANSCEIVER_TYPE_SWC 6
| AU5790. More...
#define | canTRANSCEIVER_TYPE_EVA 7
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_FIBER 8
| 82c251 with fibre extension More...
#define | canTRANSCEIVER_TYPE_K251 9
| K-line + 82c251. More...
#define | canTRANSCEIVER_TYPE_K 10
| K-line, without CAN. More...
#define | canTRANSCEIVER_TYPE_1054_OPTO 11
| TJA1054 with optical isolation. More...
#define | canTRANSCEIVER_TYPE_SWC_OPTO 12
| AU5790 with optical isolation. More...
#define | canTRANSCEIVER_TYPE_TT 13
| B10011S Truck-And-Trailer. More...
#define | canTRANSCEIVER_TYPE_1050 14
| TJA1050. More...
#define | canTRANSCEIVER_TYPE_1050_OPTO 15
| TJA1050 with optical isolation. More...
#define | canTRANSCEIVER_TYPE_1041 16
| TJA1041. More...
#define | canTRANSCEIVER_TYPE_1041_OPTO 17
| TJA1041 with optical isolation. More...
#define | canTRANSCEIVER_TYPE_RS485 18
| RS485 (i.e. J1708) More...
#define | canTRANSCEIVER_TYPE_LIN 19
| LIN. More...
#define | canTRANSCEIVER_TYPE_KONE 20
| KONE. More...
#define | canTRANSCEIVER_TYPE_CANFD 22
| CAN-FD. More...
#define | canTRANSCEIVER_TYPE_CANFD_LIN 24
| HYBRID CAN-FD/LIN. More...
#define | canTRANSCEIVER_TYPE_LINX_LIN 64
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_LINX_J1708 66
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_LINX_K 68
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_LINX_SWC 70
| Unknown or undefined. More...
#define | canTRANSCEIVER_TYPE_LINX_LS 72
| Unknown or undefined. More...

## Enumerations
enum | canStatus { canOK = 0, canERR_PARAM = -1, canERR_NOMSG = -2, canERR_NOTFOUND = -3, canERR_NOMEM = -4, canERR_NOCHANNELS = -5, canERR_INTERRUPTED = -6, canERR_TIMEOUT = -7, canERR_NOTINITIALIZED = -8, canERR_NOHANDLES = -9, canERR_INVHANDLE = -10, canERR_INIFILE = -11, canERR_DRIVER = -12, canERR_TXBUFOFL = -13, canERR_RESERVED_1 = -14, canERR_HARDWARE = -15, canERR_DYNALOAD = -16, canERR_DYNALIB = -17, canERR_DYNAINIT = -18, canERR_NOT_SUPPORTED = -19, canERR_RESERVED_5 = -20, canERR_RESERVED_6 = -21, canERR_RESERVED_2 = -22, canERR_DRIVERLOAD = -23, canERR_DRIVERFAILED = -24, canERR_NOCONFIGMGR = -25, canERR_NOCARD = -26, canERR_RESERVED_7 = -27, canERR_REGISTRY = -28, canERR_LICENSE = -29, canERR_INTERNAL = -30, canERR_NO_ACCESS = -31, canERR_NOT_IMPLEMENTED = -32, canERR_DEVICE_FILE = -33, canERR_HOST_FILE = -34, canERR_DISK = -35, canERR_CRC = -36, canERR_CONFIG = -37, canERR_MEMO_FAIL = -38, canERR_SCRIPT_FAIL = -39, canERR_SCRIPT_WRONG_VERSION = -40, canERR_SCRIPT_TXE_CONTAINER_VERSION = -41, canERR_SCRIPT_TXE_CONTAINER_FORMAT = -42, canERR_BUFFER_TOO_SMALL = -43, canERR__RESERVED = -44 }

## Detailed Description

Definitions for the CANLIB API.

## Macro Definition Documentation

## ◆ canEVENT_BUSONOFF

#define canEVENT_BUSONOFF 32005

Bus on/off status changed.

## ◆ canEVENT_ENVVAR

#define canEVENT_ENVVAR 32004

An envvar changed.

## ◆ canEVENT_ERROR

#define canEVENT_ERROR 32002

when a CAN bus error is reported by the CAN controller

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canEVENT_RX

#define canEVENT_RX 32000

when the queue of received CAN messages goes from empty to non-empty

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canEVENT_STATUS

#define canEVENT_STATUS 32003

when the CAN controller changes state

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canEVENT_TX

#define canEVENT_TX 32001

when a CAN message has been transmitted

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canFDMSG_BRS

#define canFDMSG_BRS 0x020000

Message is sent/received with bit rate switch (CAN FD)

Examples:
  canfdmonitor.c, and canfdwrite.c.

## ◆ canFDMSG_EDL

#define canFDMSG_EDL 0x010000

Obsolete, use canFDMSG_FDF instead.

## ◆ canFDMSG_ESI

#define canFDMSG_ESI 0x040000

Sender of the message is in error passive mode (CAN FD)

Examples:
  canfdmonitor.c.

## ◆ canFDMSG_FDF

#define canFDMSG_FDF 0x010000

Message is an FD message (CAN FD)

Examples:
  canfdmonitor.c, and canfdwrite.c.

## ◆ canFDMSG_MASK

#define canFDMSG_MASK 0xff0000

Obsolete, use canFDMSG_FDF instead.

## ◆ canMSG_ABL

#define canMSG_ABL 0x4000000

Only together with canMSG_TXNACK, Single shot message was not sent because arbitration was lost. This flag is only used with received messages.

## ◆ canMSG_DELAY_MSG

#define canMSG_DELAY_MSG 0x0100

Message is NOT sent on the bus. The transmission of messages are delayed. The dlc specifies the delay in milliseconds (1..1000).

## ◆ canMSG_ERROR_FRAME

#define canMSG_ERROR_FRAME 0x0020

Message is an error frame.

Examples:
  cancount.c, canfdmonitor.c, and canmonitor.c.

## ◆ canMSG_EXT

#define canMSG_EXT 0x0004

Message has an extended ID.

Examples:
  cancount.c, canfdmonitor.c, canfdwrite.c, and writeloop.c.

## ◆ canMSG_MASK

#define canMSG_MASK 0x00ff

Used to mask the non-info bits.

## ◆ canMSG_NERR

#define canMSG_NERR 0x0010

NERR was active during the message

The NERR flag is set by the CAN transceiver when certain CAN bus wire faults occur, namely:

- CANH wire interrupted
- CANL wire interrupted
- CANH short-circuited to battery
- CANH short-circuited to VCC
- CANL short-circuited to ground
- CANH short-circuited to ground
- CANL short-circuited to battery
- CANL short-circuited to VCC
- CANL and CANH mutually short-circuited

See the TJA1054 data sheet (available from Philips) for more detailed information.

## ◆ canMSG_RTR

#define canMSG_RTR 0x0001

Message is a remote request.

Examples:
  cancount.c.

## ◆ canMSG_SINGLE_SHOT

#define canMSG_SINGLE_SHOT 0x1000000

Message is Single Shot, try to send once, no retransmission. This flag can only be used with transmitted messages.

## ◆ canMSG_STD

#define canMSG_STD 0x0002

Message has a standard ID.

Examples:
  cancount.c.

## ◆ canMSG_TXACK

#define canMSG_TXACK 0x0040

Message is a TX ACK (msg is really sent)

## ◆ canMSG_TXNACK

#define canMSG_TXNACK 0x2000000

Message is a failed Single Shot, message was not sent. This flag is only used with received messages.

## ◆ canMSG_TXRQ

#define canMSG_TXRQ 0x0080

Message is a TX REQUEST (msg is transfered to the chip)

## ◆ canMSG_WAKEUP

#define canMSG_WAKEUP 0x0008

Message to be sent / was received in wakeup mode.

## ◆ canMSGERR_BIT

#define canMSGERR_BIT 0xC000

Any bit error.

## ◆ canMSGERR_BIT0

#define canMSGERR_BIT0 0x4000

Sent dom, read rec.

## ◆ canMSGERR_BIT1

#define canMSGERR_BIT1 0x8000

Sent rec, read dom.

## ◆ canMSGERR_BUSERR

#define canMSGERR_BUSERR 0xF800

Any RX error.

## ◆ canMSGERR_CRC

#define canMSGERR_CRC 0x2000

CRC error.

## ◆ canMSGERR_FORM

#define canMSGERR_FORM 0x1000

Form error.

## ◆ canMSGERR_HW_OVERRUN

#define canMSGERR_HW_OVERRUN 0x0200

HW buffer overrun.

See also
  Overruns

## ◆ canMSGERR_MASK

#define canMSGERR_MASK 0xff00

Used to mask the non-error bits.

## ◆ canMSGERR_OVERRUN

#define canMSGERR_OVERRUN 0x0600

Any overrun condition.

See also
  Overruns

Examples:
  cancount.c.

## ◆ canMSGERR_STUFF

#define canMSGERR_STUFF 0x0800

Stuff error.

## ◆ canMSGERR_SW_OVERRUN

#define canMSGERR_SW_OVERRUN 0x0400

SW buffer overrun.

See also
  Overruns

## ◆ canNOTIFY_BUSONOFF

#define canNOTIFY_BUSONOFF 0x0020

Notify on bus on/off status changed.

## ◆ canNOTIFY_ENVVAR

#define canNOTIFY_ENVVAR 0x0010

An environment variable was changed by a script. Note that you will not be notified when an environment variable is updated from the Canlib API.

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canNOTIFY_ERROR

#define canNOTIFY_ERROR 0x0004

CAN bus error notification.

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canNOTIFY_NONE

#define canNOTIFY_NONE 0

Turn notifications off.

## ◆ canNOTIFY_RX

#define canNOTIFY_RX 0x0001

CAN message reception notification.

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canNOTIFY_STATUS

#define canNOTIFY_STATUS 0x0008

CAN chip status change.

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canNOTIFY_TX

#define canNOTIFY_TX 0x0002

CAN message transmission notification.

Examples:
  canmonitor.c, and simplewrite.c.

## ◆ canSTAT_BUS_OFF

#define canSTAT_BUS_OFF 0x00000002

The circuit is Off Bus.

## ◆ canSTAT_ERROR_ACTIVE

#define canSTAT_ERROR_ACTIVE 0x00000008

The circuit is error active.

## ◆ canSTAT_ERROR_PASSIVE

#define canSTAT_ERROR_PASSIVE 0x00000001

The circuit is error passive.

## ◆ canSTAT_ERROR_WARNING

#define canSTAT_ERROR_WARNING 0x00000004

At least one error counter > 96.

## ◆ canSTAT_HW_OVERRUN

#define canSTAT_HW_OVERRUN 0x00000200

There has been at least one HW buffer overflow.

## ◆ canSTAT_OVERRUN

#define canSTAT_OVERRUN (canSTAT_HW_OVERRUN | canSTAT_SW_OVERRUN)

For convenience.

## ◆ canSTAT_RESERVED_1

#define canSTAT_RESERVED_1 0x00000040

The circuit is error passive.

## ◆ canSTAT_RX_PENDING

#define canSTAT_RX_PENDING 0x00000020

There are messages in the receive buffer.

## ◆ canSTAT_RXERR

#define canSTAT_RXERR 0x00000100

There has been at least one RX error of some sort.

## ◆ canSTAT_SW_OVERRUN

#define canSTAT_SW_OVERRUN 0x00000400

There has been at least one SW buffer overflow.

## ◆ canSTAT_TX_PENDING

#define canSTAT_TX_PENDING 0x00000010

There are messages pending transmission.

## ◆ canSTAT_TXERR

#define canSTAT_TXERR 0x00000080

There has been at least one TX error.

## ◆ CANSTATUS_FAILURE

#define CANSTATUS_FAILURE | ( |  | X | ) | ((X) != canOK)

## ◆ CANSTATUS_SUCCESS

#define CANSTATUS_SUCCESS | ( |  | X | ) | ((X) == canOK)

## ◆ canTRANSCEIVER_LINEMODE_NA

#define canTRANSCEIVER_LINEMODE_NA 0

Not Affected/Not available.

## ◆ canTRANSCEIVER_LINEMODE_NORMAL

#define canTRANSCEIVER_LINEMODE_NORMAL 9

Normal mode (the inverse of sleep mode) for those supporting it.

## ◆ canTRANSCEIVER_LINEMODE_OEM1

#define canTRANSCEIVER_LINEMODE_OEM1 13

Reserved for OEM apps.

## ◆ canTRANSCEIVER_LINEMODE_OEM2

#define canTRANSCEIVER_LINEMODE_OEM2 14

Reserved for OEM apps.

## ◆ canTRANSCEIVER_LINEMODE_OEM3

#define canTRANSCEIVER_LINEMODE_OEM3 15

Reserved for OEM apps.

## ◆ canTRANSCEIVER_LINEMODE_OEM4

#define canTRANSCEIVER_LINEMODE_OEM4 16

Reserved for OEM apps.

## ◆ canTRANSCEIVER_LINEMODE_SLEEP

#define canTRANSCEIVER_LINEMODE_SLEEP 8

Sleep mode for those supporting it.

## ◆ canTRANSCEIVER_LINEMODE_STDBY

#define canTRANSCEIVER_LINEMODE_STDBY 10

Standby for those who support it.

## ◆ canTRANSCEIVER_LINEMODE_SWC_FAST

#define canTRANSCEIVER_LINEMODE_SWC_FAST 6

SWC High-Speed Mode.

## ◆ canTRANSCEIVER_LINEMODE_SWC_NORMAL

#define canTRANSCEIVER_LINEMODE_SWC_NORMAL 5

SWC Normal Mode.

## ◆ canTRANSCEIVER_LINEMODE_SWC_SLEEP

#define canTRANSCEIVER_LINEMODE_SWC_SLEEP 4

SWC Sleep Mode.

## ◆ canTRANSCEIVER_LINEMODE_SWC_WAKEUP

#define canTRANSCEIVER_LINEMODE_SWC_WAKEUP 7

SWC Wakeup Mode.

## ◆ canTRANSCEIVER_LINEMODE_TT_CAN_H

#define canTRANSCEIVER_LINEMODE_TT_CAN_H 11

Truck & Trailer: operating mode single wire using CAN high.

## ◆ canTRANSCEIVER_LINEMODE_TT_CAN_L

#define canTRANSCEIVER_LINEMODE_TT_CAN_L 12

Truck & Trailer: operating mode single wire using CAN low.

## ◆ canTRANSCEIVER_RESNET_MASTER

#define canTRANSCEIVER_RESNET_MASTER 1

## ◆ canTRANSCEIVER_RESNET_MASTER_STBY

#define canTRANSCEIVER_RESNET_MASTER_STBY 2

## ◆ canTRANSCEIVER_RESNET_NA

#define canTRANSCEIVER_RESNET_NA 0

## ◆ canTRANSCEIVER_RESNET_SLAVE

#define canTRANSCEIVER_RESNET_SLAVE 3

## ◆ canTRANSCEIVER_TYPE_1041

#define canTRANSCEIVER_TYPE_1041 16

TJA1041.

## ◆ canTRANSCEIVER_TYPE_1041_OPTO

#define canTRANSCEIVER_TYPE_1041_OPTO 17

TJA1041 with optical isolation.

## ◆ canTRANSCEIVER_TYPE_1050

#define canTRANSCEIVER_TYPE_1050 14

TJA1050.

## ◆ canTRANSCEIVER_TYPE_1050_OPTO

#define canTRANSCEIVER_TYPE_1050_OPTO 15

TJA1050 with optical isolation.

## ◆ canTRANSCEIVER_TYPE_1054_OPTO

#define canTRANSCEIVER_TYPE_1054_OPTO 11

TJA1054 with optical isolation.

## ◆ canTRANSCEIVER_TYPE_251

#define canTRANSCEIVER_TYPE_251 1

82c251

## ◆ canTRANSCEIVER_TYPE_252

#define canTRANSCEIVER_TYPE_252 2

82c252, TJA1053, TJA1054

## ◆ canTRANSCEIVER_TYPE_CANFD

#define canTRANSCEIVER_TYPE_CANFD 22

CAN-FD.

## ◆ canTRANSCEIVER_TYPE_CANFD_LIN

#define canTRANSCEIVER_TYPE_CANFD_LIN 24

HYBRID CAN-FD/LIN.

## ◆ canTRANSCEIVER_TYPE_DNOPTO

#define canTRANSCEIVER_TYPE_DNOPTO 3

Optoisolated 82C251.

## ◆ canTRANSCEIVER_TYPE_EVA

#define canTRANSCEIVER_TYPE_EVA 7

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_FIBER

#define canTRANSCEIVER_TYPE_FIBER 8

82c251 with fibre extension

## ◆ canTRANSCEIVER_TYPE_K

#define canTRANSCEIVER_TYPE_K 10

K-line, without CAN.

## ◆ canTRANSCEIVER_TYPE_K251

#define canTRANSCEIVER_TYPE_K251 9

K-line + 82c251.

## ◆ canTRANSCEIVER_TYPE_KONE

#define canTRANSCEIVER_TYPE_KONE 20

KONE.

## ◆ canTRANSCEIVER_TYPE_LIN

#define canTRANSCEIVER_TYPE_LIN 19

LIN.

## ◆ canTRANSCEIVER_TYPE_LINX_J1708

#define canTRANSCEIVER_TYPE_LINX_J1708 66

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_LINX_K

#define canTRANSCEIVER_TYPE_LINX_K 68

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_LINX_LIN

#define canTRANSCEIVER_TYPE_LINX_LIN 64

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_LINX_LS

#define canTRANSCEIVER_TYPE_LINX_LS 72

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_LINX_SWC

#define canTRANSCEIVER_TYPE_LINX_SWC 70

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_RS485

#define canTRANSCEIVER_TYPE_RS485 18

RS485 (i.e. J1708)

## ◆ canTRANSCEIVER_TYPE_SWC

#define canTRANSCEIVER_TYPE_SWC 6

AU5790.

## ◆ canTRANSCEIVER_TYPE_SWC_OPTO

#define canTRANSCEIVER_TYPE_SWC_OPTO 12

AU5790 with optical isolation.

## ◆ canTRANSCEIVER_TYPE_SWC_PROTO

#define canTRANSCEIVER_TYPE_SWC_PROTO 5

AU5790 prototype.

## ◆ canTRANSCEIVER_TYPE_TT

#define canTRANSCEIVER_TYPE_TT 13

B10011S Truck-And-Trailer.

## ◆ canTRANSCEIVER_TYPE_UNKNOWN

#define canTRANSCEIVER_TYPE_UNKNOWN 0

Unknown or undefined.

## ◆ canTRANSCEIVER_TYPE_W210

#define canTRANSCEIVER_TYPE_W210 4

Unknown or undefined.

## Enumeration Type Documentation

## ◆ canStatus

enum canStatus

Enumerator
canOK | Normal successful completion; The driver is just fine, and really believes it carried out your command to everyone's satisfaction.
canERR_PARAM | Error in one or more parameters; a parameter specified in the call was invalid, out of range, or so. This status code will also be returned when the call is not implemented.
canERR_NOMSG | There were no messages to read; A function tried to read a message, but there was no message to read.
canERR_NOTFOUND | Specified device or channel not found. There is no hardware available that matches the given search criteria. For example, you may have specified canOPEN_REQUIRE_EXTENDED but there's no controller capable of extended CAN. You may have specified a channel number that is out of the range for the hardware in question. You may have requested exclusive access to a channel, but the channel is already occupied.
canERR_NOMEM | Out of memory; A memory allocation failed.
canERR_NOCHANNELS | No channels available; There is indeed hardware matching the criteria you specified, but there are no channels available, or the channel you specified is already occupied.
canERR_INTERRUPTED | Interrupted by signals.
canERR_TIMEOUT | Timeout occurred; A function waited for something to happen (for example, the arrival of a message), but that something didn't happen.
canERR_NOTINITIALIZED | The library is not initialized; The driver is not initialized. canInitializeLibrary() was probably not called?
canERR_NOHANDLES | Out of handles; No handles are available inside canlib32. The application has too many handles open (i.e. has called canOpenChannel() too many times, or there's a memory leak somewhere.) Note We are not talking about Windows handles here, it's CANLIB's own internal handles.
canERR_INVHANDLE | Handle is invalid; The CANLIB handle you specified (if the API call includes a handle) is not valid. Ensure you are passing the handle and not, for example, a channel number.
canERR_INIFILE | Error in the ini-file (16-bit only)
canERR_DRIVER | Driver type not supported; CAN driver mode is not supported by the present hardware.
canERR_TXBUFOFL | Transmit buffer overflow; The transmit queue was full, so the message was dropped.
canERR_RESERVED_1 | Reserved.
canERR_HARDWARE | A hardware error has occurred; Something probably related to the hardware happened. This could mean that the device does not respond (IRQ or address conflict?), or that the response was invalid or unexpected (faulty card?).
canERR_DYNALOAD | A driver DLL can't be found or loaded; (One of) the DLL(s) specified in the registry failed to load. This could be a driver installation problem.
canERR_DYNALIB | A DLL seems to have wrong version; DLL version mismatch. (One of) the DLL(s) specified in the registry is - probably - too old, or - less likely - too new.
canERR_DYNAINIT | Error when initializing a DLL; Something failed when a device driver was being initialized. In other words, we can open the driver but it makes a lot of fuss about something we don't understand.
canERR_NOT_SUPPORTED | Operation not supported by hardware or firmware.
canERR_RESERVED_5 | Reserved.
canERR_RESERVED_6 | Reserved.
canERR_RESERVED_2 | Reserved.
canERR_DRIVERLOAD | Can't find or load kernel driver; A device driver (kernel mode driver for NT, VxD for W95/98) failed to load; or the DLL could not open the device. Privileges? Driver file missing?
canERR_DRIVERFAILED | DeviceIOControl failed; Use Win32 GetLastError() to learn what really happened.
canERR_NOCONFIGMGR | Can't find req'd config s/w (e.g. CS/SS)
canERR_NOCARD | The card was removed or not inserted.
canERR_RESERVED_7 | Reserved.
canERR_REGISTRY | Error (missing data) in the Registry; A registry key is missing, invalid, malformed, has gone for lunch or what not. can_verify.exe might provide some insight.
canERR_LICENSE | The license is not valid.
canERR_INTERNAL | Internal error in the driver; Indicates an error condition in the driver or DLL, which couldn't be properly handled. Please contact the friendly support at suppo.nosp@m.rt@k.nosp@m.vaser.nosp@m..com.
canERR_NO_ACCESS | Access denied; This means that you tried to set the bit rate on a handle to which you haven't got init access or you tried to open a channel that already is open with init access. See canOpenChannel() for more information about init access.
canERR_NOT_IMPLEMENTED | Not implemented; The requested feature or function is not implemented in the device you are trying to use it on.
canERR_DEVICE_FILE | Device File error; An error has occured when trying to access a file on the device.
canERR_HOST_FILE | Host File error; An error has occured when trying to access a file on the host.
canERR_DISK | Disk error; A disk error has occurred. Verify that the disk is initialized.
canERR_CRC | CRC error; The CRC calculation did not match the expected result.
canERR_CONFIG | Configuration Error; The configuration is corrupt.
canERR_MEMO_FAIL | Memo Error; Other configuration error.
canERR_SCRIPT_FAIL | Script Fail; A script has failed. Note This code represents several different failures, for example: Trying to load a corrupt file or not a .txe file Trying to start a t script that has not been loaded Trying to load a t script compiled with the wrong version of the t compiler Trying to unload a t script that has not been stopped Trying to use an envvar that does not exist
canERR_SCRIPT_WRONG_VERSION | The t script version dosen't match the version(s) that the device firmware supports.;
canERR_SCRIPT_TXE_CONTAINER_VERSION | The compiled t script container file format is of a version which is not supported by this version of canlib.;
canERR_SCRIPT_TXE_CONTAINER_FORMAT | An error occured while trying to parse the compiled t script file.;
canERR_BUFFER_TOO_SMALL | The buffer provided was not large enough to contain the requested data.;
canERR__RESERVED | Reserved.