# Enumerations

## AcceptFilterFlag

class `canlib.canlib.``AcceptFilterFlag`

  canFILTER_SET_xxx

  `NULL_MASK` = 0
  `SET_CODE_EXT` = 5
  `SET_CODE_STD` = 3
  `SET_MASK_EXT` = 6
  `SET_MASK_STD` = 4

## BusTypeGroup

class `canlib.canlib.``BusTypeGroup`

  kvBUSTYPE_GROUP_xxx

  Bus type group.

  `INTERNAL` = 4
  `LOCAL` = 2
  `REMOTE` = 3
  `VIRTUAL` = 1

## ChannelCap

class `canlib.canlib.``ChannelCap`

  canCHANNEL_CAP_xxx

  Channel capabilities.

  Changed in version 1.8.

  `BUS_STATISTICS` = 2
  `CAN_FD` = 524288
  `CAN_FD_NONISO` = 1048576
  `DIAGNOSTICS` = 268435456
  `ERROR_COUNTERS` = 4
  `EXTENDED_CAN` = 1
  `GENERATE_ERROR` = 16
  `GENERATE_OVERLOAD` = 32
  `IO_API` = 134217728
  `LIN_HYBRID` = 67108864
  `LOGGER` = 8388608
  `REMOTE_ACCESS` = 16777216
  `RESERVED_1` = 262144
  `RESERVED_2` = 8
  `SCRIPT` = 33554432
  `SILENT_MODE` = 2097152
  `SIMULATED` = 131072
  `SINGLE_SHOT` = 4194304
  `TXACKNOWLEDGE` = 128
  `TXREQUEST` = 64
  `VIRTUAL` = 65536

## ChannelDataItem

class `canlib.canlib.``ChannelDataItem`

  An enumeration.

  `BUS_PARAM_LIMITS` = 45
  `BUS_TYPE` = 30
  `CARD_FIRMWARE_REV` = 9
  `CARD_HARDWARE_REV` = 10
  `CARD_NUMBER` = 5
  `CARD_SERIAL_NO` = 7
  `CARD_TYPE` = 4
  `CARD_UPC_NO` = 11
  `CHANNEL_CAP` = 1
  `CHANNEL_CAP_MASK` = 38
  `CHANNEL_FLAGS` = 3
  `CHANNEL_NAME` = 13
  `CHANNEL_QUALITY` = 28
  `CHAN_NO_ON_CARD` = 6
  `CLOCK_INFO` = 46
  `CUST_CHANNEL_NAME` = 39
  `DEVDESCR_ASCII` = 26
  `DEVDESCR_UNICODE` = 25
  `DEVICE_PHYSICAL_POSITION` = 18
  `DEVNAME_ASCII` = 31
  `DLL_FILETYPE` = 16
  `DLL_FILE_VERSION` = 14
  `DLL_PRODUCT_VERSION` = 15
  `DRIVER_FILE_VERSION` = 21
  `DRIVER_NAME` = 27
  `DRIVER_PRODUCT_VERSION` = 22
  `FEATURE_EAN` = 44
  `HW_STATUS` = 43
  `IS_REMOTE` = 40
  `LOGGER_TYPE` = 42
  `MAX_BITRATE` = 37
  `MFGNAME_ASCII` = 24
  `MFGNAME_UNICODE` = 23
  `REMOTE_HOST_NAME` = 35
  `REMOTE_MAC` = 36
  `REMOTE_OPERATIONAL_MODE` = 33
  `REMOTE_PROFILE_NAME` = 34
  `REMOTE_TYPE` = 41
  `ROUNDTRIP_TIME` = 29
  `TIMESYNC_ENABLED` = 20
  `TIME_SINCE_LAST_SEEN` = 32
  `TRANS_CAP` = 2
  `TRANS_SERIAL_NO` = 8
  `TRANS_TYPE` = 17
  `TRANS_UPC_NO` = 12
  `UI_NUMBER` = 19

## ChannelFlags

class `canlib.canlib.``ChannelFlags`

  canCHANNEL_IS_xxx

  These channel flags are used in conjunction with `ChannelDataItem.CHANNEL_FLAGS`.

  `IS_CANFD` = 4
  `IS_EXCLUSIVE` = 1
  `IS_LIN` = 16
  `IS_LIN_MASTER` = 32
  `IS_LIN_SLAVE` = 64
  `IS_OPEN` = 2

## DeviceMode

class `canlib.canlib.``DeviceMode`

  An enumeration.

  `INTERFACE` = 0
  `LOGGER` = 1

## Driver

class `canlib.canlib.``Driver`

  An enumeration.

  `NORMAL` = 4
  `OFF` = 0
  `SELFRECEPTION` = 8
  `SILENT` = 1

## DriverCap

class `canlib.canlib.``DriverCap`

  canDRIVER_CAP_xxx

  Driver (transceiver) capabilities.

  `HIGHSPEED` = 1

## EnvVarType

class `canlib.canlib.``EnvVarType`

  An enumeration.

  `FLOAT` = 2
  `INT` = 1
  `STRING` = 3

## Error

class `canlib.canlib.``Error`

  An enumeration.

  `HARDWARE` = -15
  `INVALID_PASSWORD` = -128
  `INVALID_SESSION` = -131
  `INVHANDLE` = -10
  `IO_CONFIG_CHANGED` = -46
  `IO_NOT_CONFIRMED` = -45
  `IO_NO_VALID_CONFIG` = -48
  `IO_PENDING` = -47
  `NOCARD` = -26
  `NOCHANNELS` = -5
  `NOHANDLES` = -9
  `NOMSG` = -2
  `NOTFOUND` = -3
  `NOT_AUTHORIZED` = -130
  `NOT_IMPLEMENTED` = -32
  `NO_SUCH_FUNCTION` = -129
  `PARAM` = -1
  `SCRIPT_FAIL` = -39
  `TIMEOUT` = -7
  `TXBUFOFL` = -13

## HardwareType

class `canlib.canlib.``HardwareType`

  canHWTYPE_xxx

  The following constants can be returned from canGetChannelData(), using the canCHANNELDATA_CARD_TYPE item code. They identify the hardware type for the channel specified in the call to canGetChannelData().

  Note

  The members indicate a hardware type, but not necessarily a specific product. For example, canHWTYPE_LAPCAN is returned both for LAPcan and LAPcan II. (You can use canGetChannelData() to obtain the UPC/EAN code for the device. This number uniquely identifies the product.)

  `ACQUISITOR` = 46
  `BAGEL` = 64
  `BLACKBIRD` = 58
  `BLACKBIRD_V2` = 64
  `CANLINHYBRID` = 84
  `CANPARI` = 3
  `DINRAIL` = 86
  `EAGLE` = 62
  `ETHERCAN` = 70
  `IRIS` = 58
  `LAPCAN` = 2
  `LEAF` = 48
  `LEAF2` = 80
  `MEMORATOR_II` = 54
  `MEMORATOR_LIGHT` = 60
  `MEMORATOR_PRO` = 54
  `MEMORATOR_PRO2` = 78
  `MEMORATOR_V2` = 82
  `MINIHYDRA` = 62
  `MINIPCIE` = 66
  `NONE` = 0
  `PC104_PLUS` = 50
  `PCCAN` = 8
  `PCICAN` = 9
  `PCICANX_II` = 52
  `PCICAN_II` = 40
  `PCIE_V2` = 76
  `SIMULATED` = 44
  `USBCAN` = 11
  `USBCAN_II` = 42
  `USBCAN_KLINE` = 68
  `USBCAN_LIGHT` = 72
  `USBCAN_PRO` = 56
  `USBCAN_PRO2` = 74
  `VIRTUAL` = 1

## IOControlItem

class `canlib.canlib.``IOControlItem`

  An enumeration.

  `CLEAR_ERROR_COUNTERS` = 5
  `CONNECT_TO_VIRTUAL_BUS` = 22
  `DISCONNECT_FROM_VIRTUAL_BUS` = 23
  `FLUSH_RX_BUFFER` = 10
  `FLUSH_TX_BUFFER` = 11
  `GET_BUS_TYPE` = 36
  `GET_CHANNEL_QUALITY` = 34
  `GET_DEVNAME_ASCII` = 37
  `GET_DRIVERHANDLE` = 17
  `GET_EVENTHANDLE` = 14
  `GET_REPORT_ACCESS_ERRORS` = 21
  `GET_ROUNDTRIP_TIME` = 35
  `GET_RX_BUFFER_LEVEL` = 8
  `GET_THROTTLE_SCALED` = 42
  `GET_TIMER_SCALE` = 12
  `GET_TIME_SINCE_LAST_SEEN` = 38
  `GET_TREF_LIST` = 39
  `GET_TXACK` = 31
  `GET_TX_BUFFER_LEVEL` = 9
  `GET_USB_THROTTLE` = 29
  `GET_USER_IOPORT` = 25
  `GET_WAKEUP` = 19
  `LIN_MODE` = 45
  `MAP_RXQUEUE` = 18
  `PREFER_EXT` = 1
  `PREFER_STD` = 2
  `RESET_OVERRUN_COUNT` = 44
  `SET_BRLIMIT` = 43
  `SET_BUFFER_WRAPAROUND_MODE` = 26
  `SET_BUSON_TIME_AUTO_RESET` = 30
  `SET_BYPASS_MODE` = 15
  `SET_ERROR_FRAMES_REPORTING` = 33
  `SET_LOCAL_TXECHO` = 32
  `SET_REPORT_ACCESS_ERRORS` = 20
  `SET_RX_QUEUE_SIZE` = 27
  `SET_THROTTLE_SCALED` = 41
  `SET_TIMER_SCALE` = 6
  `SET_TXACK` = 7
  `SET_TXRQ` = 13
  `SET_USB_THROTTLE` = 28
  `SET_USER_IOPORT` = 24
  `SET_WAKEUP` = 16
  `TX_INTERVAL` = 40

## LEDAction

class `canlib.canlib.``LEDAction`

  kvLED_ACTION_xxx

  The following can be used together with `canlib.canlib.Channel.flashLeds`.

  `ALL_LEDS_OFF` = 1

    Turn all LEDs off.

  `ALL_LEDS_ON` = 0

    Turn all LEDs on.

  `LED_0_OFF` = 3

    Turn LED 0 off.

  `LED_0_ON` = 2

    Turn LED 0 on.

  `LED_1_OFF` = 5

    Turn LED 1 off.

  `LED_1_ON` = 4

    Turn LED 1 on.

  `LED_2_OFF` = 7

    Turn LED 2 off.

  `LED_2_ON` = 6

    Turn LED 2 on.

  `LED_3_OFF` = 9

    Turn LED 3 off.

  `LED_3_ON` = 8

    Turn LED 3 on.

## LoggerType

class `canlib.canlib.``LoggerType`

  kvLOGGER_TYPE_xxx

  Logger type, returned when using canCHANNELDATA_LOGGER_TYPE

  `NOT_A_LOGGER` = 0
  `V1` = 1
  `V2` = 2

## MessageFlag

class `canlib.canlib.``MessageFlag`

  Message information flags

  The following flags can be returned from `Channel.read` et al, or passed to `Channel.write`.

  This enum is a combination of flags for messages, CAN FD messages, and message errors. Normal messages flags are the flags covered by `MSG_MASK`, CAN FD message flags are those covered by `FDMSG_MASK`, and message errors are those covered by `MSGERR_MASK`.

  Note

  `FDF`, `BRS`, and `ESI` require CAN FD.

  `RTR` cannot be set for CAN FD messages.

  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 `OVERRUN` for this purpose.

  `BIT` = 49152
  `BIT0` = 16384
  `BIT1` = 32768
  `BRS` = 131072
  `BUSERR` = 63488
  `CRC` = 8192
  `EDL` = 65536
  `ERROR_FRAME` = 32
  `ESI` = 262144
  `EXT` = 4
  `FDF` = 65536
  `FDMSG_MASK` = 16711680
  `FORM` = 4096
  `HW_OVERRUN` = 512
  `MSGERR_MASK` = 65280
  `MSG_MASK` = 255
  `NERR` = 16
  `OVERRUN` = 1536
  `RTR` = 1
  `STD` = 2
  `STUFF` = 2048
  `SW_OVERRUN` = 1024
  `TXACK` = 64
  `TXRQ` = 128
  `WAKEUP` = 8

## Notify

class `canlib.canlib.``Notify`

  canNOTIFY_xxx

  These notify flags are used in `Channel.set_callback` to indicate different kind of events.

  `BUSONOFF` = 32
  `ENVVAR` = 16
  `ERROR` = 4
  `NONE` = 0
  `REMOVED` = 64
  `RX` = 1
  `STATUS` = 8
  `TX` = 2

## Open

class `canlib.canlib.``Open`

  An enumeration.

  `ACCEPT_LARGE_DLC` = 512
  `ACCEPT_VIRTUAL` = 32
  `CAN_FD` = 1024
  `CAN_FD_NONISO` = 2048
  `EXCLUSIVE` = 8
  `NOFLAG` = 0
  `NO_INIT_ACCESS` = 256
  `OVERRIDE_EXCLUSIVE` = 64
  `REQUIRE_EXTENDED` = 16
  `REQUIRE_INIT_ACCESS` = 128

## OperationalMode

class `canlib.canlib.``OperationalMode`

  canCHANNEL_OPMODE_xxx

  Current WLAN operational mode.

  `ADH` = 4
  `INFRASTRUCTURE` = 2
  `NONE` = 1
  `RESERVED` = 3

## RemoteType

class `canlib.canlib.``RemoteType`

  kvREMOTE_TYPExxx

  Remote type, returned when using canCHANNELDATA_REMOTE_TYPE

  `LAN` = 2
  `NOT_REMOTE` = 0
  `WLAN` = 1

## ScriptRequest

class `canlib.canlib.``ScriptRequest`

  kvSCRIPT_REQUEST_TEXT_xxx

  These defines are used in kvScriptRequestText() for printf message subscribe/unsubscribe.

  `ALL_SLOTS` = 255
  `SUBSCRIBE` = 2
  `UNSUBSCRIBE` = 1

## ScriptStatus

class `canlib.canlib.``ScriptStatus`

  Status of t program

  New in version 1.6.

  Changed in version 1.7: Is now based on `IntFlag` instead of `IntEnum`

  `IDLE` = 0
  `LOADED` = 1
  `RUNNING` = 2

## ScriptStop

class `canlib.canlib.``ScriptStop`

  An enumeration.

  `FORCED` = -9
  `NORMAL` = 0

## Stat

class `canlib.canlib.``Stat`

  canSTAT_xxx

  The following circuit status flags are returned by `Channel.readStatus`. 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.

  `BUS_OFF` = 2
  `ERROR_ACTIVE` = 8
  `ERROR_PASSIVE` = 1
  `ERROR_WARNING` = 4
  `HW_OVERRUN` = 512
  `OVERRUN` = 1536
  `RESERVED_1` = 64
  `RXERR` = 256
  `RX_PENDING` = 32
  `SW_OVERRUN` = 1024
  `TXERR` = 128
  `TX_PENDING` = 16

## TransceiverType

class `canlib.canlib.``TransceiverType`

  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

  If the type starts with a number `T_` has been prepended to the name.

  They indicate a hardware type, but not necessarily a specific circuit or product.

  `CANFD` = 22
  `CANFD_LIN` = 24
  `DNOPTO` = 3
  `EVA` = 7
  `FIBER` = 8
  `K` = 10
  `K251` = 9
  `KONE` = 20
  `LIN` = 19
  `LINX_J1708` = 66
  `LINX_K` = 68
  `LINX_LIN` = 64
  `LINX_LS` = 72
  `LINX_SWC` = 70
  `RS485` = 18
  `SWC` = 6
  `SWC_OPTO` = 12
  `SWC_PROTO` = 5
  `TT` = 13
  `T_1041` = 16
  `T_1041_OPTO` = 17
  `T_1050` = 14
  `T_1050_OPTO` = 15
  `T_1054_OPTO` = 11
  `T_251` = 1
  `T_252` = 2
  `UNKNOWN` = 0
  `W210` = 4

## TxeDataItem

class `canlib.canlib.``TxeDataItem`

  An enumeration.

  `COMPILER_VERSION` = 2
  `DATE` = 3
  `DESCRIPTION` = 4
  `FILE_VERSION` = 1
  `IS_ENCRYPTED` = 7
  `SIZE_OF_CODE` = 6
  `SOURCE` = 5