canlib.h File Reference

Definitions for the CANlib API. More...

#include <stdlib.h>
#include <windows.h>
#include "predef.h"
#include "canevt.h"
#include "canstat.h"
#include "obsolete.h"

Go to the source code of this file.

Data Structures

struct  kvBusParamsTq
 
struct  kvClockInfo
 
struct  kvBusParamLimits
 
struct  canUserIoPortData
 
struct  canBusStatistics_s
 
struct  kvTimeDomainData_s
 
struct  kvIoModuleDigital
 
struct  kvIoModuleInternal
 
struct  kvIoModuleRelay
 
struct  kvIoModuleAnalog
 

Macros

#define canINVALID_HANDLE   (-1)
 Indicates an invalid canHandle. More...
 
#define CanHandle   int
 
#define WM__CANLIB   (WM_USER+16354)
 
canOPEN_xxx

These defines are used in canOpenChannel().

#define canOPEN_EXCLUSIVE   0x0008
 
#define canOPEN_REQUIRE_EXTENDED   0x0010
 
#define canOPEN_ACCEPT_VIRTUAL   0x0020
 
#define canOPEN_OVERRIDE_EXCLUSIVE   0x0040
 
#define canOPEN_REQUIRE_INIT_ACCESS   0x0080
 
#define canOPEN_NO_INIT_ACCESS   0x0100
 
#define canOPEN_ACCEPT_LARGE_DLC   0x0200
 
#define canOPEN_CAN_FD   0x0400
 
#define canOPEN_CAN_FD_NONISO   0x0800
 
#define canOPEN_INTERNAL_L   0x1000
 
canFILTER_xxx

Flags for canAccept().

#define canFILTER_ACCEPT   1
 
#define canFILTER_REJECT   2
 
#define canFILTER_SET_CODE_STD   3
 
#define canFILTER_SET_MASK_STD   4
 
#define canFILTER_SET_CODE_EXT   5
 
#define canFILTER_SET_MASK_EXT   6
 
#define canFILTER_NULL_MASK   0L
 
canDRIVER_xxx

CAN driver types - not all are supported on all cards.

#define canDRIVER_NORMAL   4
 
#define canDRIVER_SILENT   1
 
#define canDRIVER_SELFRECEPTION   8
 
#define canDRIVER_OFF   0
 
canBITRATE_xxx

Common bus speeds. Used in canSetBusParams() and canSetBusParamsC200(). The values are translated in canlib, canTranslateBaud().

Note
The BAUD_xxx names are only retained for compatibility.
See also
Set CAN Bitrate, Set CAN FD Bitrate
#define canBITRATE_1M   (-1)
 
#define canBITRATE_500K   (-2)
 
#define canBITRATE_250K   (-3)
 
#define canBITRATE_125K   (-4)
 
#define canBITRATE_100K   (-5)
 
#define canBITRATE_62K   (-6)
 
#define canBITRATE_50K   (-7)
 
#define canBITRATE_83K   (-8)
 
#define canBITRATE_10K   (-9)
 
#define canFD_BITRATE_500K_80P   (-1000)
 
#define canFD_BITRATE_1M_80P   (-1001)
 
#define canFD_BITRATE_2M_80P   (-1002)
 
#define canFD_BITRATE_2M_60P   (-1007)
 
#define canFD_BITRATE_4M_80P   (-1003)
 
#define canFD_BITRATE_8M_60P   (-1004)
 
#define canFD_BITRATE_8M_80P   (-1005)
 
#define canFD_BITRATE_8M_70P   (-1006)
 
#define BAUD_1M   (-1)
 
#define BAUD_500K   (-2)
 
#define BAUD_250K   (-3)
 
#define BAUD_125K   (-4)
 
#define BAUD_100K   (-5)
 
#define BAUD_62K   (-6)
 
#define BAUD_50K   (-7)
 
#define BAUD_83K   (-8)
 
kvREMOTE_TYPExxx

Remote type, returned when using canCHANNELDATA_REMOTE_TYPE

#define kvREMOTE_TYPE_NOT_REMOTE   0
 
#define kvREMOTE_TYPE_WLAN   1
 
#define kvREMOTE_TYPE_LAN   2
 
kvLOGGER_TYPE_xxx

Logger type, returned when using canCHANNELDATA_LOGGER_TYPE

#define kvLOGGER_TYPE_NOT_A_LOGGER   0
 
#define kvLOGGER_TYPE_V1   1
 
#define kvLOGGER_TYPE_V2   2
 
canCHANNELDATA_xxx

These defines are used in canGetChannelData() and canGetHandleData().

#define canCHANNELDATA_CHANNEL_CAP   1
 
#define canCHANNELDATA_TRANS_CAP   2
 
#define canCHANNELDATA_CHANNEL_FLAGS   3
 
#define canCHANNELDATA_CARD_TYPE   4
 
#define canCHANNELDATA_CARD_NUMBER   5
 
#define canCHANNELDATA_CHAN_NO_ON_CARD   6
 
#define canCHANNELDATA_CARD_SERIAL_NO   7
 
#define canCHANNELDATA_TRANS_SERIAL_NO   8
 
#define canCHANNELDATA_CARD_FIRMWARE_REV   9
 
#define canCHANNELDATA_CARD_HARDWARE_REV   10
 
#define canCHANNELDATA_CARD_UPC_NO   11
 
#define canCHANNELDATA_TRANS_UPC_NO   12
 
#define canCHANNELDATA_CHANNEL_NAME   13
 
#define canCHANNELDATA_DLL_FILE_VERSION   14
 
#define canCHANNELDATA_DLL_PRODUCT_VERSION   15
 
#define canCHANNELDATA_DLL_FILETYPE   16
 
#define canCHANNELDATA_TRANS_TYPE   17
 
#define canCHANNELDATA_DEVICE_PHYSICAL_POSITION   18
 
#define canCHANNELDATA_UI_NUMBER   19
 
#define canCHANNELDATA_TIMESYNC_ENABLED   20
 
#define canCHANNELDATA_DRIVER_FILE_VERSION   21
 
#define canCHANNELDATA_DRIVER_PRODUCT_VERSION   22
 
#define canCHANNELDATA_MFGNAME_UNICODE   23
 
#define canCHANNELDATA_MFGNAME_ASCII   24
 
#define canCHANNELDATA_DEVDESCR_UNICODE   25
 
#define canCHANNELDATA_DEVDESCR_ASCII   26
 
#define canCHANNELDATA_DRIVER_NAME   27
 
#define canCHANNELDATA_CHANNEL_QUALITY   28
 
#define canCHANNELDATA_ROUNDTRIP_TIME   29
 
#define canCHANNELDATA_BUS_TYPE   30
 
#define canCHANNELDATA_DEVNAME_ASCII   31
 
#define canCHANNELDATA_TIME_SINCE_LAST_SEEN   32
 
#define canCHANNELDATA_REMOTE_OPERATIONAL_MODE   33
 
#define canCHANNELDATA_REMOTE_PROFILE_NAME   34
 
#define canCHANNELDATA_REMOTE_HOST_NAME   35
 
#define canCHANNELDATA_REMOTE_MAC   36
 
#define canCHANNELDATA_MAX_BITRATE   37
 
#define canCHANNELDATA_CHANNEL_CAP_MASK   38
 
#define canCHANNELDATA_CUST_CHANNEL_NAME   39
 
#define canCHANNELDATA_IS_REMOTE   40
 
#define canCHANNELDATA_REMOTE_TYPE   41
 
#define canCHANNELDATA_LOGGER_TYPE   42
 
#define canCHANNELDATA_HW_STATUS   43
 
#define canCHANNELDATA_FEATURE_EAN   44
 
#define canCHANNELDATA_BUS_PARAM_LIMITS   45
 
#define canCHANNELDATA_CLOCK_INFO   46
 
#define canCHANNELDATA_CHANNEL_CAP_EX   47
 
canCHANNEL_IS_xxx

These channelFlags are used in canGetChannelData() and in conjunction with canCHANNELDATA_CHANNEL_FLAGS.

#define canCHANNEL_IS_EXCLUSIVE   0x0001
 
#define canCHANNEL_IS_OPEN   0x0002
 
#define canCHANNEL_IS_CANFD   0x0004
 
#define canCHANNEL_IS_LIN   0x0010
 
#define canCHANNEL_IS_LIN_MASTER   0x0020
 
#define canCHANNEL_IS_LIN_SLAVE   0x0040
 
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
They 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.)
#define canHWTYPE_NONE   0
 Unknown or undefined. More...
 
#define canHWTYPE_VIRTUAL   1
 The virtual CAN bus. More...
 
#define canHWTYPE_LAPCAN   2
 LAPcan Family. More...
 
#define canHWTYPE_CANPARI   3
 CANpari (obsolete). More...
 
#define canHWTYPE_PCCAN   8
 PCcan Family. More...
 
#define canHWTYPE_PCICAN   9
 PCIcan Family. More...
 
#define canHWTYPE_USBCAN   11
 USBcan (obsolete). More...
 
#define canHWTYPE_PCICAN_II   40
 PCIcan II family. More...
 
#define canHWTYPE_USBCAN_II   42
 USBcan II, USBcan Rugged, Kvaser Memorator. More...
 
#define canHWTYPE_SIMULATED   44
 Simulated CAN bus for Kvaser Creator (obsolete). More...
 
#define canHWTYPE_ACQUISITOR   46
 Kvaser Acquisitor (obsolete). More...
 
#define canHWTYPE_LEAF   48
 Kvaser Leaf Family. More...
 
#define canHWTYPE_PC104_PLUS   50
 Kvaser PC104+. More...
 
#define canHWTYPE_PCICANX_II   52
 Kvaser PCIcanx II. More...
 
#define canHWTYPE_MEMORATOR_II   54
 Kvaser Memorator Professional family. More...
 
#define canHWTYPE_MEMORATOR_PRO   54
 Kvaser Memorator Professional family. More...
 
#define canHWTYPE_USBCAN_PRO   56
 Kvaser USBcan Professional. More...
 
#define canHWTYPE_IRIS   58
 Obsolete name, use canHWTYPE_BLACKBIRD instead. More...
 
#define canHWTYPE_BLACKBIRD   58
 Kvaser BlackBird. More...
 
#define canHWTYPE_MEMORATOR_LIGHT   60
 Kvaser Memorator Light. More...
 
#define canHWTYPE_MINIHYDRA   62
 Obsolete name, use canHWTYPE_EAGLE instead. More...
 
#define canHWTYPE_EAGLE   62
 Kvaser Eagle family. More...
 
#define canHWTYPE_BAGEL   64
 Obsolete name, use canHWTYPE_BLACKBIRD_V2 instead. More...
 
#define canHWTYPE_BLACKBIRD_V2   64
 Kvaser BlackBird v2. More...
 
#define canHWTYPE_MINIPCIE   66
 Kvaser Mini PCI Express. More...
 
#define canHWTYPE_USBCAN_KLINE   68
 USBcan Pro HS/K-Line. More...
 
#define canHWTYPE_ETHERCAN   70
 Kvaser Ethercan. More...
 
#define canHWTYPE_USBCAN_LIGHT   72
 Kvaser USBcan Light. More...
 
#define canHWTYPE_USBCAN_PRO2   74
 Kvaser USBcan Pro 5xHS and variants. More...
 
#define canHWTYPE_PCIE_V2   76
 Kvaser PCIEcan 4xHS and variants. More...
 
#define canHWTYPE_MEMORATOR_PRO2   78
 Kvaser Memorator Pro 5xHS and variants. More...
 
#define canHWTYPE_LEAF2   80
 Kvaser Leaf Pro HS v2 and variants. More...
 
#define canHWTYPE_MEMORATOR_V2   82
 Kvaser Memorator (2nd generation) More...
 
#define canHWTYPE_CANLINHYBRID   84
 Kvaser Hybrid CAN/LIN. More...
 
#define canHWTYPE_DINRAIL   86
 Kvaser DIN Rail SE400S and variants. More...
 
#define canHWTYPE_U100   88
 Kvaser U100 and variants. More...
 
#define canHWTYPE_LEAF3   90
 Kvaser Kvaser Leaf v3 and variants. More...
 
canCHANNEL_CAP_xxx

Channel capabilities.

#define canCHANNEL_CAP_EXTENDED_CAN   0x00000001L
 Used in canGetChannelData(). Can use extended identifiers. More...
 
#define canCHANNEL_CAP_BUS_STATISTICS   0x00000002L
 Used in canGetChannelData(). Can report busload etc. More...
 
#define canCHANNEL_CAP_ERROR_COUNTERS   0x00000004L
 Used in canGetChannelData(). Can return error counters. More...
 
#define canCHANNEL_CAP_RESERVED_2   0x00000008L
 Obsolete, only used by LAPcan driver. More...
 
#define canCHANNEL_CAP_GENERATE_ERROR   0x00000010L
 Used in canGetChannelData(). Can send error frames. More...
 
#define canCHANNEL_CAP_GENERATE_OVERLOAD   0x00000020L
 Used in canGetChannelData(). Can send CAN overload frame. More...
 
#define canCHANNEL_CAP_TXREQUEST   0x00000040L
 Used in canGetChannelData(). Can report when a CAN message transmission is initiated. More...
 
#define canCHANNEL_CAP_TXACKNOWLEDGE   0x00000080L
 Used in canGetChannelData(). Can report when a CAN messages has been transmitted. More...
 
#define canCHANNEL_CAP_VIRTUAL   0x00010000L
 Used in canGetChannelData(). Virtual CAN channel. More...
 
#define canCHANNEL_CAP_SIMULATED   0x00020000L
 Used in canGetChannelData(). Simulated CAN channel. More...
 
#define canCHANNEL_CAP_RESERVED_1   0x00040000L
 Obsolete, use canCHANNEL_CAP_REMOTE_ACCESS or canGetChannelData() instead. More...
 
#define canCHANNEL_CAP_CAN_FD   0x00080000L
 Used in canGetChannelData(). CAN-FD ISO compliant channel. More...
 
#define canCHANNEL_CAP_CAN_FD_NONISO   0x00100000L
 Used in canGetChannelData(). CAN-FD NON-ISO compliant channel. More...
 
#define canCHANNEL_CAP_SILENT_MODE   0x00200000L
 Used in canGetChannelData(). Channel supports Silent mode. More...
 
#define canCHANNEL_CAP_SINGLE_SHOT   0x00400000L
 Used in canGetChannelData(). Channel supports Single Shot messages. More...
 
#define canCHANNEL_CAP_LOGGER   0x00800000L
 Used in canGetChannelData(). Channel has logger capabilities. More...
 
#define canCHANNEL_CAP_REMOTE_ACCESS   0x01000000L
 Used in canGetChannelData(). Channel has remote capabilities. More...
 
#define canCHANNEL_CAP_SCRIPT   0x02000000L
 Used in canGetChannelData(). Channel has script capabilities. More...
 
#define canCHANNEL_CAP_LIN_HYBRID   0x04000000L
 Used in canGetChannelData(). Channel has LIN capabilities. More...
 
#define canCHANNEL_CAP_IO_API   0x08000000L
 Used in canGetChannelData(). Channel has IO API capabilities. More...
 
#define canCHANNEL_CAP_CANTEGRITY   0x10000000L
 Used in canGetChannelData(). Channel has CANtegrity capabilities. More...
 
canCHANNEL_CAP_EX_xxx

Channel extended capabilities.

#define canCHANNEL_CAP_EX_BUSPARAMS_TQ   0x0000000000000001L
 Used in canGetChannelData() with canCHANNELDATA_CHANNEL_CAP_EX as the item argument. Channel has BusParams TQ API. More...
 
canCHANNEL_OPMODE_xxx

Current WLAN operational mode.

Note
Not implemented in linux.
#define canCHANNEL_OPMODE_NONE   1
 
#define canCHANNEL_OPMODE_INFRASTRUCTURE   2
 
#define canCHANNEL_OPMODE_RESERVED   3
 
#define canCHANNEL_OPMODE_ADHOC   4
 
canDRIVER_CAP_xxx

Driver (transceiver) capabilities.

#define canDRIVER_CAP_HIGHSPEED   0x00000001L
 
canIOCTL_xxx

These defines are used in canIoCtl().

#define canIOCTL_PREFER_EXT   1
 
#define canIOCTL_PREFER_STD   2
 
#define canIOCTL_CLEAR_ERROR_COUNTERS   5
 
#define canIOCTL_SET_TIMER_SCALE   6
 
#define canIOCTL_SET_TXACK   7
 
#define canIOCTL_GET_RX_BUFFER_LEVEL   8
 
#define canIOCTL_GET_TX_BUFFER_LEVEL   9
 
#define canIOCTL_FLUSH_RX_BUFFER   10
 
#define canIOCTL_FLUSH_TX_BUFFER   11
 
#define canIOCTL_GET_TIMER_SCALE   12
 
#define canIOCTL_SET_TXRQ   13
 
#define canIOCTL_GET_EVENTHANDLE   14
 
#define canIOCTL_SET_BYPASS_MODE   15
 
#define canIOCTL_SET_WAKEUP   16
 
#define canIOCTL_GET_DRIVERHANDLE   17
 
#define canIOCTL_MAP_RXQUEUE   18
 
#define canIOCTL_GET_WAKEUP   19
 
#define canIOCTL_SET_REPORT_ACCESS_ERRORS   20
 
#define canIOCTL_GET_REPORT_ACCESS_ERRORS   21
 
#define canIOCTL_CONNECT_TO_VIRTUAL_BUS   22
 
#define canIOCTL_DISCONNECT_FROM_VIRTUAL_BUS   23
 
#define canIOCTL_SET_USER_IOPORT   24
 
#define canIOCTL_GET_USER_IOPORT   25
 
#define canIOCTL_SET_BUFFER_WRAPAROUND_MODE   26
 
#define canIOCTL_SET_RX_QUEUE_SIZE   27
 
#define canIOCTL_SET_USB_THROTTLE   28
 
#define canIOCTL_GET_USB_THROTTLE   29
 
#define canIOCTL_SET_BUSON_TIME_AUTO_RESET   30
 
#define canIOCTL_GET_TXACK   31
 
#define canIOCTL_SET_LOCAL_TXECHO   32
 
#define canIOCTL_SET_ERROR_FRAMES_REPORTING   33
 
#define canIOCTL_GET_CHANNEL_QUALITY   34
 
#define canIOCTL_GET_ROUNDTRIP_TIME   35
 
#define canIOCTL_GET_BUS_TYPE   36
 
#define canIOCTL_GET_DEVNAME_ASCII   37
 
#define canIOCTL_GET_TIME_SINCE_LAST_SEEN   38
 
#define canIOCTL_GET_TREF_LIST   39
 
#define canIOCTL_TX_INTERVAL   40
 
#define canIOCTL_SET_BRLIMIT   43
 
#define canIOCTL_SET_USB_THROTTLE_SCALED   41
 
#define canIOCTL_SET_THROTTLE_SCALED   41
 
#define canIOCTL_GET_USB_THROTTLE_SCALED   42
 
#define canIOCTL_GET_THROTTLE_SCALED   42
 
#define canIOCTL_RESET_OVERRUN_COUNT   44
 
#define canIOCTL_LIN_MODE   45
 
#define canIOCTL_SET_LOCAL_TXACK   46
 
canVERSION_CANLIB32_xxx

Item codes for canGetVersionEx().

#define canVERSION_CANLIB32_VERSION   0
 
#define canVERSION_CANLIB32_PRODVER   1
 
#define canVERSION_CANLIB32_PRODVER32   2
 
#define canVERSION_CANLIB32_BETA   3
 
canOBJBUF_TYPE_xxx
#define canOBJBUF_TYPE_AUTO_RESPONSE   0x01
 The buffer is an auto-response buffer. More...
 
#define canOBJBUF_TYPE_PERIODIC_TX   0x02
 The buffer is an auto-transmit buffer. More...
 
canOBJBUF_AUTO_RESPONSE_xxx

These defines are used in canObjBufSetFlags().

#define canOBJBUF_AUTO_RESPONSE_RTR_ONLY   0x01
 
canVERSION_xxx

These defines are used in canProbeVersion().

#define canVERSION_DONT_ACCEPT_LATER   0x01
 
#define canVERSION_DONT_ACCEPT_BETAS   0x02
 
kvLED_ACTION_xxx

The following constants can be used together with the kvFlashLeds() function.

#define kvLED_ACTION_ALL_LEDS_ON   0
 Turn all LEDs on. More...
 
#define kvLED_ACTION_ALL_LEDS_OFF   1
 Turn all LEDs off. More...
 
#define kvLED_ACTION_LED_0_ON   2
 Turn LED 0 on. More...
 
#define kvLED_ACTION_LED_0_OFF   3
 Turn LED 0 off. More...
 
#define kvLED_ACTION_LED_1_ON   4
 Turn LED 1 on. More...
 
#define kvLED_ACTION_LED_1_OFF   5
 Turn LED 1 off. More...
 
#define kvLED_ACTION_LED_2_ON   6
 Turn LED 2 on. More...
 
#define kvLED_ACTION_LED_2_OFF   7
 Turn LED 2 off. More...
 
#define kvLED_ACTION_LED_3_ON   8
 Turn LED 3 on. More...
 
#define kvLED_ACTION_LED_3_OFF   9
 Turn LED 3 off. More...
 
#define kvLED_ACTION_LED_4_ON   10
 Turn LED 4 on. More...
 
#define kvLED_ACTION_LED_4_OFF   11
 Turn LED 4 off. More...
 
#define kvLED_ACTION_LED_5_ON   12
 Turn LED 5 on. More...
 
#define kvLED_ACTION_LED_5_OFF   13
 Turn LED 5 off. More...
 
#define kvLED_ACTION_LED_6_ON   14
 Turn LED 6 on. More...
 
#define kvLED_ACTION_LED_6_OFF   15
 Turn LED 6 off. More...
 
#define kvLED_ACTION_LED_7_ON   16
 Turn LED 7 on. More...
 
#define kvLED_ACTION_LED_7_OFF   17
 Turn LED 7 off. More...
 
#define kvLED_ACTION_LED_8_ON   18
 Turn LED 8 on. More...
 
#define kvLED_ACTION_LED_8_OFF   19
 Turn LED 8 off. More...
 
#define kvLED_ACTION_LED_9_ON   20
 Turn LED 9 on. More...
 
#define kvLED_ACTION_LED_9_OFF   21
 Turn LED 9 off. More...
 
#define kvLED_ACTION_LED_10_ON   22
 Turn LED 10 on. More...
 
#define kvLED_ACTION_LED_10_OFF   23
 Turn LED 10 off. More...
 
#define kvLED_ACTION_LED_11_ON   24
 Turn LED 11 on. More...
 
#define kvLED_ACTION_LED_11_OFF   25
 Turn LED 11 off. More...
 
kvBUSTYPE_xxx

Bus types, returned by kvGetSupportedInterfaceInfo().

Note
Not inplemented in linux.
#define kvBUSTYPE_NONE   0
 
#define kvBUSTYPE_PCI   1
 
#define kvBUSTYPE_PCMCIA   2
 
#define kvBUSTYPE_USB   3
 
#define kvBUSTYPE_WLAN   4
 
#define kvBUSTYPE_PCI_EXPRESS   5
 
#define kvBUSTYPE_ISA   6
 
#define kvBUSTYPE_VIRTUAL   7
 
#define kvBUSTYPE_PC104_PLUS   8
 
#define kvBUSTYPE_LAN   9
 
kvBUSTYPE_GROUP_xxx

Bus type group, returned when using canCHANNELDATA_BUS_TYPE This is a grouping of the individual kvBUSTYPE_xxx.

Note
Not implemented in linux.
#define kvBUSTYPE_GROUP_VIRTUAL   1
 
#define kvBUSTYPE_GROUP_LOCAL   2
 
#define kvBUSTYPE_GROUP_REMOTE   3
 
#define kvBUSTYPE_GROUP_INTERNAL   4
 
kvENVVAR_TYPE_xxx

These defines are used in kvScriptEnvvarOpen().

#define kvENVVAR_TYPE_INT   1
 
#define kvENVVAR_TYPE_FLOAT   2
 
#define kvENVVAR_TYPE_STRING   3
 
kvEVENT_xxx

These defines are used in kvScriptSendEvent().

#define kvEVENT_TYPE_KEY   1
 
kvSCRIPT_STOP_xxx

Script stop modes. Used by kvScriptStop().

#define kvSCRIPT_STOP_NORMAL   0
 
#define kvSCRIPT_STOP_FORCED   -9
 
kvSCRIPT_REQUEST_TEXT_xxx

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

#define kvSCRIPT_REQUEST_TEXT_UNSUBSCRIBE   1
 
#define kvSCRIPT_REQUEST_TEXT_SUBSCRIBE   2
 
#define kvSCRIPT_REQUEST_TEXT_ALL_SLOTS   255
 
kvSCRIPT_STATUS_xxx

Script status flag bits. Used by kvScriptStatus().

#define kvSCRIPT_STATUS_LOADED   1
 
#define kvSCRIPT_STATUS_RUNNING   2
 
canTXEDATA_xxx

These defines are used in kvScriptTxeGetData().

#define canTXEDATA_FILE_VERSION   1
 
#define canTXEDATA_COMPILER_VERSION   2
 
#define canTXEDATA_DATE   3
 
#define canTXEDATA_DESCRIPTION   4
 
#define canTXEDATA_SOURCE   5
 
#define canTXEDATA_SIZE_OF_CODE   6
 
#define canTXEDATA_IS_ENCRYPTED   7
 
kvDEVICE_MODE_xxx

These defines are used in kvDeviceSetMode() and kvDeviceGetMode().

Note
The mode is device specific, which means that not all modes are implemented in all products.
#define kvDEVICE_MODE_INTERFACE   0x00
 
#define kvDEVICE_MODE_LOGGER   0x01
 
kvIO_INFO_GET_xxx

These defines are used in kvIoPinGetInfo(). The value range for each property is specified in the manufacturer's user manual.

#define kvIO_INFO_GET_MODULE_TYPE   1
 
#define kvIO_INFO_GET_DIRECTION   2
 
#define kvIO_INFO_GET_PIN_TYPE   4
 
#define kvIO_INFO_GET_NUMBER_OF_BITS   5
 
#define kvIO_INFO_GET_RANGE_MIN   6
 
#define kvIO_INFO_GET_RANGE_MAX   7
 
#define kvIO_INFO_GET_DI_LOW_HIGH_FILTER   8
 
#define kvIO_INFO_GET_DI_HIGH_LOW_FILTER   9
 
#define kvIO_INFO_GET_AI_LP_FILTER_ORDER   10
 
#define kvIO_INFO_GET_AI_HYSTERESIS   11
 
#define kvIO_INFO_GET_MODULE_NUMBER   14
 
#define kvIO_INFO_GET_SERIAL_NUMBER   15
 
#define kvIO_INFO_GET_FW_VERSION   16
 
kvIO_INFO_SET_xxx

These defines are used in kvIoPinSetInfo(). The value range for each property is specified in the manufacturer's user manual.

#define kvIO_INFO_SET_DI_LOW_HIGH_FILTER   8
 
#define kvIO_INFO_SET_DI_HIGH_LOW_FILTER   9
 
#define kvIO_INFO_SET_AI_LP_FILTER_ORDER   10
 
#define kvIO_INFO_SET_AI_HYSTERESIS   11
 
kvIO_MODULE_TYPE_xxx

These defines are used in kvIoPinGetInfo().

#define kvIO_MODULE_TYPE_DIGITAL   1
 
#define kvIO_MODULE_TYPE_ANALOG   2
 
#define kvIO_MODULE_TYPE_RELAY   3
 
#define kvIO_MODULE_TYPE_INTERNAL   4
 
kvIO_PIN_TYPE_xxx

These defines are used in kvIoPinGetInfo().

#define kvIO_PIN_TYPE_DIGITAL   1
 
#define kvIO_PIN_TYPE_ANALOG   2
 
#define kvIO_PIN_TYPE_RELAY   3
 
kvIO_PIN_DIRECTION_xxx

These defines are used in kvIoPinGetInfo().

#define kvIO_PIN_DIRECTION_IN   4
 
#define kvIO_PIN_DIRECTION_OUT   8
 

Typedefs

typedef int canHandle
 
typedef struct kvBusParamsTq kvBusParamsTq
 
typedef struct kvClockInfo kvClockInfo
 
typedef struct kvBusParamLimits kvBusParamLimits
 
typedef struct canBusStatistics_s canBusStatistics
 
typedef void * kvTimeDomain
 
typedef canStatus kvStatus
 
typedef struct kvTimeDomainData_s kvTimeDomainData
 
typedef void(__stdcall * kvCallback_t) (int hnd, void *context, unsigned int notifyEvent)
 
typedef __int64 kvEnvHandle
 

Functions

void canInitializeLibrary (void)
 
canStatus canEnumHardwareEx (int *channelCount)
 
canStatus canClose (const int hnd)
 
canStatus canBusOn (const int hnd)
 
canStatus canBusOff (const int hnd)
 
canStatus canSetBusParams (const int hnd, long freq, unsigned int tseg1, unsigned int tseg2, unsigned int sjw, unsigned int noSamp, unsigned int syncmode)
 
canStatus canSetBusParamsTq (const int hnd, const kvBusParamsTq nominal)
 
canStatus canSetBusParamsFd (const int hnd, long freq_brs, unsigned int tseg1_brs, unsigned int tseg2_brs, unsigned int sjw_brs)
 
canStatus canSetBusParamsFdTq (const int hnd, const kvBusParamsTq arbitration, const kvBusParamsTq data)
 
canStatus canGetBusParams (const int hnd, long *freq, unsigned int *tseg1, unsigned int *tseg2, unsigned int *sjw, unsigned int *noSamp, unsigned int *syncmode)
 
canStatus canGetBusParamsTq (const int hnd, kvBusParamsTq *nominal)
 
canStatus canGetBusParamsFd (const int hnd, long *freq_brs, unsigned int *tseg1_brs, unsigned int *tseg2_brs, unsigned int *sjw_brs)
 
canStatus canGetBusParamsFdTq (const int hnd, kvBusParamsTq *nominal, kvBusParamsTq *data)
 
canStatus canSetBusOutputControl (const int hnd, const unsigned int drivertype)
 
canStatus canGetBusOutputControl (const int hnd, unsigned int *drivertype)
 
canStatus canAccept (const int hnd, const long envelope, const unsigned int flag)
 
canStatus canReadStatus (const int hnd, unsigned long *const flags)
 
canStatus canReadErrorCounters (const int hnd, unsigned int *txErr, unsigned int *rxErr, unsigned int *ovErr)
 
canStatus canWrite (const int hnd, long id, void *msg, unsigned int dlc, unsigned int flag)
 
canStatus canWriteSync (const int hnd, unsigned long timeout)
 
canStatus canRead (const int hnd, long *id, void *msg, unsigned int *dlc, unsigned int *flag, unsigned long *time)
 
canStatus canReadWait (const int hnd, long *id, void *msg, unsigned int *dlc, unsigned int *flag, unsigned long *time, unsigned long timeout)
 
canStatus canReadSpecific (const int hnd, long id, void *msg, unsigned int *dlc, unsigned int *flag, unsigned long *time)
 
canStatus canReadSync (const int hnd, unsigned long timeout)
 
canStatus canReadSyncSpecific (const int hnd, long id, unsigned long timeout)
 
canStatus canReadSpecificSkip (const int hnd, long id, void *msg, unsigned int *dlc, unsigned int *flag, unsigned long *time)
 
canStatus canSetNotify (const int hnd, HWND aHWnd, unsigned int aNotifyFlags)
 
canStatus canTranslateBaud (long *const freq, unsigned int *const tseg1, unsigned int *const tseg2, unsigned int *const sjw, unsigned int *const nosamp, unsigned int *const syncMode)
 
canStatus kvBitrateToBusParamsTq (const canHandle hnd, int freq, kvBusParamsTq *nominal)
 
canStatus kvBitrateToBusParamsFdTq (const canHandle hnd, int freqA, int freqD, kvBusParamsTq *arbitration, kvBusParamsTq *data)
 
canStatus canGetErrorText (canStatus err, char *buf, unsigned int bufsiz)
 
unsigned short canGetVersion (void)
 
canStatus canIoCtl (const int hnd, unsigned int func, void *buf, unsigned int buflen)
 
unsigned long canReadTimer (const int hnd)
 
int canOpenChannel (int channel, int flags)
 
canStatus canGetNumberOfChannels (int *channelCount)
 
canStatus canGetChannelData (int channel, int item, void *buffer, size_t bufsize)
 
canStatus canWaitForEvent (const int hnd, DWORD timeout)
 
canStatus canSetBusParamsC200 (const int hnd, unsigned char btr0, unsigned char btr1)
 
canStatus canSetDriverMode (const int hnd, int lineMode, int resNet)
 
canStatus canGetDriverMode (const int hnd, int *lineMode, int *resNet)
 
unsigned int canGetVersionEx (unsigned int itemCode)
 
canStatus canParamGetCount (void)
 
canStatus canParamCommitChanges (void)
 
canStatus canParamDeleteEntry (int index)
 
canStatus canParamCreateNewEntry (void)
 
canStatus canParamSwapEntries (int index1, int index2)
 
canStatus canParamGetName (int index, char *buffer, int maxlen)
 
canStatus canParamGetChannelNumber (int index)
 
canStatus canParamGetBusParams (int index, long *bitrate, unsigned int *tseg1, unsigned int *tseg2, unsigned int *sjw, unsigned int *noSamp)
 
canStatus canParamSetName (int index, const char *buffer)
 
canStatus canParamSetChannelNumber (int index, int channel)
 
canStatus canParamSetBusParams (int index, long bitrate, unsigned int tseg1, unsigned int tseg2, unsigned int sjw, unsigned int noSamp)
 
canStatus canParamFindByName (const char *name)
 
canStatus canObjBufFreeAll (const int hnd)
 
canStatus canObjBufAllocate (const int hnd, int type)
 
canStatus canObjBufFree (const int hnd, int idx)
 
canStatus canObjBufWrite (const int hnd, int idx, int id, void *msg, unsigned int dlc, unsigned int flags)
 
canStatus canObjBufSetFilter (const int hnd, int idx, unsigned int code, unsigned int mask)
 
canStatus canObjBufSetFlags (const int hnd, int idx, unsigned int flags)
 
canStatus canObjBufSetPeriod (const int hnd, int idx, unsigned int period)
 
canStatus canObjBufSetMsgCount (const int hnd, int idx, unsigned int count)
 
canStatus canObjBufEnable (const int hnd, int idx)
 
canStatus canObjBufDisable (const int hnd, int idx)
 
canStatus canObjBufSendBurst (const int hnd, int idx, unsigned int burstlen)
 
BOOL canProbeVersion (const int hnd, int major, int minor, int oem_id, unsigned int flags)
 
canStatus canResetBus (const int hnd)
 
canStatus canWriteWait (const int hnd, long id, void *msg, unsigned int dlc, unsigned int flag, unsigned long timeout)
 
canStatus canUnloadLibrary (void)
 
canStatus canSetAcceptanceFilter (const int hnd, unsigned int code, unsigned int mask, int is_extended)
 
canStatus canFlushReceiveQueue (const int hnd)
 
canStatus canFlushTransmitQueue (const int hnd)
 
canStatus kvGetApplicationMapping (int busType, char *appName, int appChannel, int *resultingChannel)
 
canStatus kvBeep (const int hnd, int freq, unsigned int duration)
 
canStatus kvSelfTest (const int hnd, unsigned long *presults)
 
canStatus kvFlashLeds (const int hnd, int action, int timeout)
 
canStatus canRequestChipStatus (const int hnd)
 
canStatus canRequestBusStatistics (const int hnd)
 
canStatus canGetBusStatistics (const int hnd, canBusStatistics *stat, size_t bufsiz)
 
canStatus canSetBitrate (const int hnd, int bitrate)
 
canStatus kvAnnounceIdentity (const int hnd, void *buf, size_t bufsiz)
 
canStatus kvAnnounceIdentityEx (const int hnd, int type, void *buf, size_t bufsiz)
 
canStatus canGetHandleData (const int hnd, int item, void *buffer, size_t bufsize)
 
kvStatus kvTimeDomainCreate (kvTimeDomain *domain)
 
kvStatus kvTimeDomainDelete (kvTimeDomain domain)
 
kvStatus kvTimeDomainResetTime (kvTimeDomain domain)
 
kvStatus kvTimeDomainGetData (kvTimeDomain domain, kvTimeDomainData *data, size_t bufsiz)
 
kvStatus kvTimeDomainAddHandle (kvTimeDomain domain, const int hnd)
 
kvStatus kvTimeDomainRemoveHandle (kvTimeDomain domain, const int hnd)
 
kvStatus kvSetNotifyCallback (const int hnd, kvCallback_t callback, void *context, unsigned int notifyFlags)
 
kvStatus kvGetSupportedInterfaceInfo (int index, char *hwName, size_t nameLen, int *hwType, int *hwBusType)
 
kvStatus kvReadDeviceCustomerData (const int hnd, int userNumber, int itemNumber, void *data, size_t bufsiz)
 
kvStatus kvScriptStart (const int hnd, int slotNo)
 
kvStatus kvScriptStop (const int hnd, int slotNo, int mode)
 
kvStatus kvScriptUnload (const int hnd, int slotNo)
 
kvStatus kvScriptSendEvent (const int hnd, int slotNo, int eventType, int eventNo, unsigned int data)
 
kvEnvHandle kvScriptEnvvarOpen (const int hnd, const char *envvarName, int *envvarType, int *envvarSize)
 
kvStatus kvScriptEnvvarClose (kvEnvHandle eHnd)
 
kvStatus kvScriptEnvvarSetInt (kvEnvHandle eHnd, int val)
 
kvStatus kvScriptEnvvarGetInt (kvEnvHandle eHnd, int *val)
 
kvStatus kvScriptEnvvarSetFloat (kvEnvHandle eHnd, float val)
 
kvStatus kvScriptEnvvarGetFloat (kvEnvHandle eHnd, float *val)
 
kvStatus kvScriptEnvvarSetData (kvEnvHandle eHnd, const void *buf, int start_index, int data_len)
 
kvStatus kvScriptEnvvarGetData (kvEnvHandle eHnd, void *buf, int start_index, int data_len)
 
kvStatus kvScriptLoadFileOnDevice (const int hnd, int slotNo, char *localFile)
 
kvStatus kvScriptLoadFile (const int hnd, int slotNo, char *filePathOnPC)
 
kvStatus kvScriptRequestText (const int hnd, unsigned int slot, unsigned int request)
 
kvStatus kvScriptGetText (const int hnd, int *slot, unsigned long *time, unsigned int *flags, char *buf, size_t bufsize)
 
kvStatus kvScriptStatus (const int hnd, int slot, unsigned int *status)
 
kvStatus kvScriptGetMaxEnvvarSize (int hnd, int *envvarSize)
 
kvStatus kvScriptTxeGetData (const char *filePathOnPC, int item, void *buffer, unsigned int *bufsize)
 
kvStatus kvFileCopyToDevice (const int hnd, char *hostFileName, char *deviceFileName)
 
kvStatus kvFileCopyFromDevice (const int hnd, char *deviceFileName, char *hostFileName)
 
kvStatus kvFileDelete (const int hnd, char *deviceFileName)
 
kvStatus kvFileGetName (const int hnd, int fileNo, char *name, int namelen)
 
kvStatus kvFileGetCount (const int hnd, int *count)
 
kvStatus kvFileGetSystemData (const int hnd, int itemCode, int *result)
 
kvStatus kvFileDiskFormat (const int hnd)
 
kvStatus kvDeviceSetMode (const int hnd, int mode)
 
kvStatus kvDeviceGetMode (const int hnd, int *result)
 
kvStatus kvPingRequest (const int hnd, unsigned int *requestTime)
 
kvStatus kvPingGetLatest (const int hnd, unsigned int *requestTime, unsigned int *pingTime)
 
kvStatus kvReadTimer (const int hnd, unsigned int *time)
 
kvStatus kvReadTimer64 (const int hnd, int64_t *time)
 
canStatus kvIoGetNumberOfPins (const int hnd, unsigned int *pinCount)
 
canStatus kvIoConfirmConfig (const int hnd)
 
canStatus kvIoPinGetInfo (const int hnd, unsigned int pin, int item, void *buffer, const unsigned int bufsize)
 
canStatus kvIoPinSetInfo (const int hnd, unsigned int pin, int item, const void *buffer, const unsigned int bufsize)
 
canStatus kvIoPinSetDigital (const int hnd, unsigned int pin, unsigned int value)
 
canStatus kvIoPinGetDigital (const int hnd, unsigned int pin, unsigned int *value)
 
canStatus kvIoPinGetOutputDigital (const int hnd, unsigned int pin, unsigned int *value)
 
canStatus kvIoPinSetRelay (const int hnd, unsigned int pin, unsigned int value)
 
canStatus kvIoPinGetOutputRelay (const int hnd, unsigned int pin, unsigned int *value)
 
canStatus kvIoPinSetAnalog (const int hnd, unsigned int pin, float value)
 
canStatus kvIoPinGetAnalog (const int hnd, unsigned int pin, float *value)
 
canStatus kvIoPinGetOutputAnalog (const int hnd, unsigned int pin, float *value)
 
canStatus kvIoGetModulePins (const int hnd, unsigned int module, void *buffer, const unsigned int bufsize)
 
canStatus kvIoSetModulePins (const int hnd, unsigned int module, const void *buffer, const unsigned int bufsize)
 

Detailed Description

Definitions for the CANlib API.

Macro Definition Documentation

◆ BAUD_100K

#define BAUD_100K   (-5)

The BAUD_xxx names are deprecated, use canBITRATE_100K instead.

◆ BAUD_125K

#define BAUD_125K   (-4)

The BAUD_xxx names are deprecated, use canBITRATE_125K instead.

◆ BAUD_1M

#define BAUD_1M   (-1)

The BAUD_xxx names are deprecated, use canBITRATE_1M instead.

◆ BAUD_250K

#define BAUD_250K   (-3)

The BAUD_xxx names are deprecated, use canBITRATE_250K instead.

◆ BAUD_500K

#define BAUD_500K   (-2)

The BAUD_xxx names are deprecated, use canBITRATE_500K instead.

◆ BAUD_50K

#define BAUD_50K   (-7)

The BAUD_xxx names are deprecated, use canBITRATE_50K instead.

◆ BAUD_62K

#define BAUD_62K   (-6)

The BAUD_xxx names are deprecated, use canBITRATE_62K instead.

◆ BAUD_83K

#define BAUD_83K   (-8)

The BAUD_xxx names are deprecated, use canBITRATE_83K instead.

◆ canBITRATE_100K

#define canBITRATE_100K   (-5)

Used in canSetBusParams() and canSetBusParamsC200(). Indicate a bitrate of 100 kbit/s.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canBITRATE_10K

#define canBITRATE_10K   (-9)

Used in canSetBusParams() and canSetBusParamsC200(). Indicate a bitrate of 10 kbit/s.

◆ canBITRATE_125K

#define canBITRATE_125K   (-4)

◆ canBITRATE_1M

◆ canBITRATE_250K

◆ canBITRATE_500K

◆ canBITRATE_50K

#define canBITRATE_50K   (-7)

Used in canSetBusParams() and canSetBusParamsC200(). Indicate a bitrate of 50 kbit/s.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canBITRATE_62K

#define canBITRATE_62K   (-6)

Used in canSetBusParams() and canSetBusParamsC200(). Indicate a bitrate of 62 kbit/s.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canBITRATE_83K

#define canBITRATE_83K   (-8)

Used in canSetBusParams() and canSetBusParamsC200(). Indicate a bitrate of 83 kbit/s.

◆ canCHANNEL_CAP_BUS_STATISTICS

#define canCHANNEL_CAP_BUS_STATISTICS   0x00000002L

Used in canGetChannelData(). Can report busload etc.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_CAN_FD

#define canCHANNEL_CAP_CAN_FD   0x00080000L

Used in canGetChannelData(). CAN-FD ISO compliant channel.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_CAN_FD_NONISO

#define canCHANNEL_CAP_CAN_FD_NONISO   0x00100000L

Used in canGetChannelData(). CAN-FD NON-ISO compliant channel.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_CANTEGRITY

#define canCHANNEL_CAP_CANTEGRITY   0x10000000L

Used in canGetChannelData(). Channel has CANtegrity capabilities.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_ERROR_COUNTERS

#define canCHANNEL_CAP_ERROR_COUNTERS   0x00000004L

Used in canGetChannelData(). Can return error counters.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_EX_BUSPARAMS_TQ

#define canCHANNEL_CAP_EX_BUSPARAMS_TQ   0x0000000000000001L

Used in canGetChannelData() with canCHANNELDATA_CHANNEL_CAP_EX as the item argument. Channel has BusParams TQ API.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_EXTENDED_CAN

#define canCHANNEL_CAP_EXTENDED_CAN   0x00000001L

Used in canGetChannelData(). Can use extended identifiers.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_GENERATE_ERROR

#define canCHANNEL_CAP_GENERATE_ERROR   0x00000010L

Used in canGetChannelData(). Can send error frames.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_GENERATE_OVERLOAD

#define canCHANNEL_CAP_GENERATE_OVERLOAD   0x00000020L

Used in canGetChannelData(). Can send CAN overload frame.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_IO_API

#define canCHANNEL_CAP_IO_API   0x08000000L

Used in canGetChannelData(). Channel has IO API capabilities.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_LIN_HYBRID

#define canCHANNEL_CAP_LIN_HYBRID   0x04000000L

Used in canGetChannelData(). Channel has LIN capabilities.

◆ canCHANNEL_CAP_LOGGER

#define canCHANNEL_CAP_LOGGER   0x00800000L

Used in canGetChannelData(). Channel has logger capabilities.

◆ canCHANNEL_CAP_REMOTE_ACCESS

#define canCHANNEL_CAP_REMOTE_ACCESS   0x01000000L

Used in canGetChannelData(). Channel has remote capabilities.

◆ canCHANNEL_CAP_RESERVED_1

#define canCHANNEL_CAP_RESERVED_1   0x00040000L

Obsolete, use canCHANNEL_CAP_REMOTE_ACCESS or canGetChannelData() instead.

◆ canCHANNEL_CAP_RESERVED_2

#define canCHANNEL_CAP_RESERVED_2   0x00000008L

Obsolete, only used by LAPcan driver.

◆ canCHANNEL_CAP_SCRIPT

#define canCHANNEL_CAP_SCRIPT   0x02000000L

Used in canGetChannelData(). Channel has script capabilities.

◆ canCHANNEL_CAP_SILENT_MODE

#define canCHANNEL_CAP_SILENT_MODE   0x00200000L

Used in canGetChannelData(). Channel supports Silent mode.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_SIMULATED

#define canCHANNEL_CAP_SIMULATED   0x00020000L

Used in canGetChannelData(). Simulated CAN channel.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_SINGLE_SHOT

#define canCHANNEL_CAP_SINGLE_SHOT   0x00400000L

Used in canGetChannelData(). Channel supports Single Shot messages.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_TXACKNOWLEDGE

#define canCHANNEL_CAP_TXACKNOWLEDGE   0x00000080L

Used in canGetChannelData(). Can report when a CAN messages has been transmitted.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_TXREQUEST

#define canCHANNEL_CAP_TXREQUEST   0x00000040L

Used in canGetChannelData(). Can report when a CAN message transmission is initiated.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_CAP_VIRTUAL

#define canCHANNEL_CAP_VIRTUAL   0x00010000L

Used in canGetChannelData(). Virtual CAN channel.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_IS_CANFD

#define canCHANNEL_IS_CANFD   0x0004

Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as CAN FD.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_IS_EXCLUSIVE

#define canCHANNEL_IS_EXCLUSIVE   0x0001

Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel is opened exclusively.

◆ canCHANNEL_IS_LIN

#define canCHANNEL_IS_LIN   0x0010

Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as LIN.

◆ canCHANNEL_IS_LIN_MASTER

#define canCHANNEL_IS_LIN_MASTER   0x0020

Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as a LIN master.

◆ canCHANNEL_IS_LIN_SLAVE

#define canCHANNEL_IS_LIN_SLAVE   0x0040

Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as a LIN slave.

◆ canCHANNEL_IS_OPEN

#define canCHANNEL_IS_OPEN   0x0002

Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel is active (either opened in LIN mode or on-bus in CAN mode.

Examples:
example/c/channeldata.c.

◆ canCHANNEL_OPMODE_ADHOC

#define canCHANNEL_OPMODE_ADHOC   4

Adhoc mode

◆ canCHANNEL_OPMODE_INFRASTRUCTURE

#define canCHANNEL_OPMODE_INFRASTRUCTURE   2

Infrastructure mode

◆ canCHANNEL_OPMODE_NONE

#define canCHANNEL_OPMODE_NONE   1

Not applicable, or unknown

◆ canCHANNEL_OPMODE_RESERVED

#define canCHANNEL_OPMODE_RESERVED   3

Reserved value, do not use

◆ canCHANNELDATA_BUS_PARAM_LIMITS

#define canCHANNELDATA_BUS_PARAM_LIMITS   45

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer is kvBusParamLimits.

◆ canCHANNELDATA_BUS_TYPE

#define canCHANNELDATA_BUS_TYPE   30

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the kvBUSTYPE_GROUP_xxx bus type.

Note
Not implemented in Linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_CARD_FIRMWARE_REV

#define canCHANNELDATA_CARD_FIRMWARE_REV   9

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 64-bit (8 bytes) area which receives the firmware revision number on the card. This number consists of four 16-bit words: the major revision, the minor revision, the release number and the build number, listed in order from the most significant to the least significant.

Examples:
example/c/channeldata.c, and how-to/c/listChannels.c.

◆ canCHANNELDATA_CARD_HARDWARE_REV

#define canCHANNELDATA_CARD_HARDWARE_REV   10

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 64-bit (8 bytes) area which receives the hardware revision number on the card. This number consists of four 16-bit words; the two most significant are always 0, and the two least significant are the major revision and the minor revision, listed in order from the most significant to the least significant.

Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_CARD_NUMBER

#define canCHANNELDATA_CARD_NUMBER   5

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the card's number in the computer. Each card type is numbered separately. For example, the first LAPcan card in a machine will have number 0, the second LAPcan number 1, etc.

Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_CARD_SERIAL_NO

#define canCHANNELDATA_CARD_SERIAL_NO   7

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 64-bit (8 bytes) area which receives the serial number of the card. If the card doesn't have a serial number, 0 is returned. The serial number is an 8-byte unsigned integer. Currently, no products are using all 8 bytes; at most 4 bytes are used.

Examples:
example/c/channeldata.c, example/c/kvrConfig.c, example/c/kvrConnect.c, and how-to/c/listChannels.c.

◆ canCHANNELDATA_CARD_TYPE

#define canCHANNELDATA_CARD_TYPE   4

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the hardware type of the card. This value is any one of the canHWTYPE_xxx constants.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canCHANNELDATA_CARD_UPC_NO

#define canCHANNELDATA_CARD_UPC_NO   11

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 8-byte area which receives the UPC (EAN) number for the card. If there is no UPC number, the buffer is filled with zeros. The UPC (EAN) number is coded as a BCD string with the LSB first, so e.g. 733-0130-00122-0 is coded as 0x30001220 0x00073301.

Examples:
example/c/channeldata.c, example/c/kvrConfig.c, example/c/kvrConnect.c, and how-to/c/listChannels.c.

◆ canCHANNELDATA_CHAN_NO_ON_CARD

#define canCHANNELDATA_CHAN_NO_ON_CARD   6

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which receives the channel number on the card.

Examples:
example/c/channeldata.c, example/c/kvrConfig.c, and how-to/c/listChannels.c.

◆ canCHANNELDATA_CHANNEL_CAP

#define canCHANNELDATA_CHANNEL_CAP   1

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the capabilities of the CAN controller; this is a combination of the canCHANNEL_CAP_xxx flags.

Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_CHANNEL_CAP_EX

#define canCHANNELDATA_CHANNEL_CAP_EX   47

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of two 64-bit unsigned integers that receives the capabilities value and capabilities mask of the CAN channel.

The value specifies the capabilities of the CAN controller; this is a combination of the canCHANNEL_CAP_EX_xxx flags. A one in a bit means that the capability is supported.

The mask specifies which capabilities the corresponding device is guaranteed to support/not support at the moment. See canCHANNEL_CAP_EX_xxx for info about flags.

Contents depending on index:

  • 0: value
  • 1: mask
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_CHANNEL_CAP_MASK

#define canCHANNELDATA_CHANNEL_CAP_MASK   38

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the capabilities mask of the CAN channel. This mask specifies which capabilities the corresponding device is guaranteed to support/not support at the moment, see canCHANNEL_CAP_xxx for info about flags.

◆ canCHANNELDATA_CHANNEL_FLAGS

#define canCHANNELDATA_CHANNEL_FLAGS   3

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives a combination of canCHANNEL_IS_xxx flags.

Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_CHANNEL_NAME

#define canCHANNELDATA_CHANNEL_NAME   13
Deprecated:
Use canCHANNELDATA_DEVDESCR_ASCII instead.

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an area which receives a zero-terminated string with a clear-text name of the channel.

Note
Use of this item code is no longer recommended. The returned channel name doesn't contain the exact hardware type (it just contains the device family) and uses zero-based channel numbering, which is not user friendly. Instead, use e.g. canCHANNELDATA_DEVDESCR_ASCII and canCHANNELDATA_CHAN_NO_ON_CARD to build your own channel name.
See also
canCHANNELDATA_DEVNAME_ASCII
Examples:
example/c/channeldata.c, example/c/kvrNetworkConnectionTest.c, and example/cpp/candemo/candemo.cpp.

◆ canCHANNELDATA_CHANNEL_QUALITY

#define canCHANNELDATA_CHANNEL_QUALITY   28

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the quality of the channel, where the quality is measured in percent of optimal quality.

For WLAN, -90 dBm and -35 dBm are considered 0% and 100%, respectively.

The quality is 100% for any directly connected channel (USB, PCI etc.).

Note
Not implemented in linux.

◆ canCHANNELDATA_CLOCK_INFO

#define canCHANNELDATA_CLOCK_INFO   46

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer is kvClockInfo.

◆ canCHANNELDATA_CUST_CHANNEL_NAME

#define canCHANNELDATA_CUST_CHANNEL_NAME   39

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

Note
If no channel name is set, canERR_NOT_IMPLEMENTED will be returned, regardless of channel name is supported in the device or not.

buffer is a user supplied byte array of length 'bufsize' (at least one byte long) to which the null terminated UTF-8 coded channel name will be placed.

Examples:
example/c/channeldata.c, and how-to/c/listChannels.c.

◆ canCHANNELDATA_DEVDESCR_ASCII

#define canCHANNELDATA_DEVDESCR_ASCII   26

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the product name of the device as a zero-terminated ASCII string.

Examples:
example/c/kvrConfig.c, and how-to/c/listChannels.c.

◆ canCHANNELDATA_DEVDESCR_UNICODE

#define canCHANNELDATA_DEVDESCR_UNICODE   25

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the product name of the device as a zero-terminated Unicode string.

Note
Not implemented in linux.

◆ canCHANNELDATA_DEVICE_PHYSICAL_POSITION

#define canCHANNELDATA_DEVICE_PHYSICAL_POSITION   18

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which receives an address indicating where the device is located on its underlying bus. The interpretation of this number is bus-specific. If the address is unknown or the bus driver does not support an address, the bus driver leaves this member at its default value of 0xFFFFFFFF.

The following list describes the information certain bus drivers store in the Address field for their child devices:

  • ISA: Does not supply an address. Defaults to 0xFFFFFFFF.
  • PC Card (PCMCIA): The socket number (typically 0x00 or 0x40)
  • PCI: The device number in the high word and the function number in the low word.
  • USB: The port number.
    Note
    Not implemented in linux.

◆ canCHANNELDATA_DEVNAME_ASCII

#define canCHANNELDATA_DEVNAME_ASCII   31

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a CHAR array of at least 32 characters which receives the current device name as a NULL terminated ASCII string. The user settable device name is currently only implemented in remote devices.

If device name is not set or the device does not support this functionality, an error will be returned.

Note
Not implemented in linux.

◆ canCHANNELDATA_DLL_FILE_VERSION

#define canCHANNELDATA_DLL_FILE_VERSION   14

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of 4 16-bit unsigned integers which receives the file version number of the second-level DLL driver file, i.e. the DLL that interfaces between canlib32.dll and the driver proper.

Contents depening on index:

  • 0: 0
  • 1: The build number
  • 2: The minor revision number
  • 3: The major revision number

◆ canCHANNELDATA_DLL_FILETYPE

#define canCHANNELDATA_DLL_FILETYPE   16

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which receives a number that identifies the second-level DLL driver file, i.e. the DLL that interfaces between canlib32.dll and the driver proper.

Values:

  • 1: kvalapw.dll - used with CANlib up to 2.29.
  • 2: kvalapw2.dll - used with CANlib from 3.0 and on.
    Note
    Not implemented in linux.

◆ canCHANNELDATA_DLL_PRODUCT_VERSION

#define canCHANNELDATA_DLL_PRODUCT_VERSION   15

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of 4 16-bit unsigned integers which receives the product version number of the second-level DLL driver file, i.e. the DLL that interfaces between canlib32.dll and the driver proper.

Contents depending on index:

  • 0: 0
  • 1: 1
  • 2: The minor revision number
  • 3: The major revision number

◆ canCHANNELDATA_DRIVER_FILE_VERSION

#define canCHANNELDATA_DRIVER_FILE_VERSION   21

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of four 16-bit unsigned integers which receives the file version number of the kernel-mode driver.

Contents depending on index:

  • 0: The build number
  • 1: 0
  • 2: The minor revision number
  • 3: The major revision number

◆ canCHANNELDATA_DRIVER_NAME

#define canCHANNELDATA_DRIVER_NAME   27

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the name of the device driver (e.g. "kcanl") as a zero-terminated ASCII string.

Note
The device driver names have no special meanings and may change from a release to another.

◆ canCHANNELDATA_DRIVER_PRODUCT_VERSION

#define canCHANNELDATA_DRIVER_PRODUCT_VERSION   22

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of four 16-bit unsigned integers which receives the product version number of the kernel-mode driver.

Contents depending on index:

  • 0: 0
  • 1: 0
  • 2: The minor revision number
  • 3: The major revision number

◆ canCHANNELDATA_FEATURE_EAN

#define canCHANNELDATA_FEATURE_EAN   44

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of two 32-bit unsigned integers that returns the feature eanLo and feature eanHi of the device.

Note
This is only intended for internal use.

◆ canCHANNELDATA_HW_STATUS

#define canCHANNELDATA_HW_STATUS   43

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to an array of six 32-bit unsigned integers that receives hardware status codes for the device.

Note
This is only intended for internal use.

◆ canCHANNELDATA_IS_REMOTE

#define canCHANNELDATA_IS_REMOTE   40

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that is 1 if the channel(device) is currently connected as a remote device. 0 if it is not currently a remote device.

Note
Not implemented in linux.

◆ canCHANNELDATA_LOGGER_TYPE

#define canCHANNELDATA_LOGGER_TYPE   42

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that returns the logger type of the device. See kvLOGGER_TYPE_xxx for returned values.

Note
Not implemented in linux.

◆ canCHANNELDATA_MAX_BITRATE

#define canCHANNELDATA_MAX_BITRATE   37

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which receives maximum bitrate of the device. Zero value means no limit on bitrate.

◆ canCHANNELDATA_MFGNAME_ASCII

#define canCHANNELDATA_MFGNAME_ASCII   24

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the device manufacturer's name as a zero-terminated ASCII string.

◆ canCHANNELDATA_MFGNAME_UNICODE

#define canCHANNELDATA_MFGNAME_UNICODE   23

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the device manufacturer's name as a zero-terminated Unicode string.

Note
Not implemented in linux.

◆ canCHANNELDATA_REMOTE_HOST_NAME

#define canCHANNELDATA_REMOTE_HOST_NAME   35

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the remote host name of the device as a zero-terminated ASCII string.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_REMOTE_MAC

#define canCHANNELDATA_REMOTE_MAC   36

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the mac address of the device as a zero-terminated ASCII string.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_REMOTE_OPERATIONAL_MODE

#define canCHANNELDATA_REMOTE_OPERATIONAL_MODE   33

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the current WLAN operational mode of the remote capable device; canCHANNEL_OPMODE_xxx.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_REMOTE_PROFILE_NAME

#define canCHANNELDATA_REMOTE_PROFILE_NAME   34

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a buffer which receives the remote profile name of the device as a zero-terminated ASCII string.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_REMOTE_TYPE

#define canCHANNELDATA_REMOTE_TYPE   41

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that returns the type of remote connection. See kvREMOTE_TYPExxx for returned values.

Note
Not implemented in linux.

◆ canCHANNELDATA_ROUNDTRIP_TIME

#define canCHANNELDATA_ROUNDTRIP_TIME   29

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer point to a 32-bit unsigned integer that receives the roundtrip time which is measured in milliseconds.

Note
Not implemented in linux.

◆ canCHANNELDATA_TIME_SINCE_LAST_SEEN

#define canCHANNELDATA_TIME_SINCE_LAST_SEEN   32

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that contains the time in milliseconds since the last communication occurred.

For WLAN devices, this is the time since the last keep-alive message.

Note
Not implemented in linux.

◆ canCHANNELDATA_TIMESYNC_ENABLED

#define canCHANNELDATA_TIMESYNC_ENABLED   20

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which is set to 0, if the legacy time synchronization is not currently enabled for the specified channel, and 1, if the legacy time synchronization is currently enabled for the specified channel.

Legacy time synchronization is a mechanism that will keep the PC and CAN channel clocks in sync. The synchronization is done in the driver, which periodically calculates the difference between the PC clock and the CAN device clock and compensates for the clock drift by recalculating the CAN message time stamps. You need to enable clock synchronization in the Control Panel using the Kvaser Hardware applet.

Note
Legacy time synchronization is implemented only on LAPcan and LAPcan II. It is not related to Kvaser MagiSync™ which is implemented in the high-end members of the Kvaser Leaf family. Kvaser MagiSync™ is always enabled and allows for much more accurate time synchronization.
Not implemented in linux.

◆ canCHANNELDATA_TRANS_CAP

#define canCHANNELDATA_TRANS_CAP   2

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer that receives the capabilities of the CAN transceiver; this is a combination of the canDRIVER_CAP_xxx flags.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_TRANS_SERIAL_NO

#define canCHANNELDATA_TRANS_SERIAL_NO   8

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 64-bit (8 bytes) area which receives the serial number of the transceiver. The serial number is an 8-byte unsigned integer. If the transceiver doesn't have a serial number, 0 is returned.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_TRANS_TYPE

#define canCHANNELDATA_TRANS_TYPE   17

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which receives the CAN transceiver type of the specified channel. This value is one of the canTRANSCEIVER_TYPE_xxx

◆ canCHANNELDATA_TRANS_UPC_NO

#define canCHANNELDATA_TRANS_UPC_NO   12

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 8-byte area which receives the UPC (EAN) number for the transceiver. If there is no UPC number, the buffer is filled with zeros. The UPC (EAN) number is coded as a BCD string with the LSB first, so e.g. 733-0130-00122-0 is coded as 0x30001220 0x00073301.

Note
Not implemented in linux.
Examples:
example/c/channeldata.c.

◆ canCHANNELDATA_UI_NUMBER

#define canCHANNELDATA_UI_NUMBER   19

This define is used in canGetChannelData(), buffer mentioned below refers to this functions argument.

buffer points to a 32-bit unsigned integer which receives a number associated with the device that can be displayed in the user interface. This number is typically a user-perceived slot number, such as a number printed next to the slot on the board, or some other number that makes locating the physical device easier for the user. For buses with no such convention, or when the UI number is unknown, 0xFFFFFFFF is returned.

Note
Not implemented in linux.

◆ canDRIVER_CAP_HIGHSPEED

#define canDRIVER_CAP_HIGHSPEED   0x00000001L

◆ canDRIVER_NORMAL

#define canDRIVER_NORMAL   4

The "normal" driver type (push-pull). This is the default.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canDRIVER_OFF

#define canDRIVER_OFF   0

The driver is turned off. Not implemented in all types of hardware.

◆ canDRIVER_SELFRECEPTION

#define canDRIVER_SELFRECEPTION   8

Self-reception. Not implemented.

◆ canDRIVER_SILENT

#define canDRIVER_SILENT   1

Sets the CAN controller in Silent Mode; that is, it doesn't send anything, not even ACK bits, on the bus. Reception works as usual.

Note
The values 2,3,5,6,7 are reserved values for compatibility reasons.
Examples:
example/c/channeldata.c, and example/cpp/candemo/candemo.cpp.

◆ canFD_BITRATE_1M_80P

#define canFD_BITRATE_1M_80P   (-1001)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 1.0 Mbit/s and sampling point at 80%.

Examples:
example/c/candump.c, and how-to/c/openChannels.c.

◆ canFD_BITRATE_2M_60P

#define canFD_BITRATE_2M_60P   (-1007)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 2.0 Mbit/s and sampling point at 60%.

◆ canFD_BITRATE_2M_80P

#define canFD_BITRATE_2M_80P   (-1002)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 2.0 Mbit/s and sampling point at 80%.

Examples:
example/c/candump.c.

◆ canFD_BITRATE_4M_80P

#define canFD_BITRATE_4M_80P   (-1003)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 4.0 Mbit/s and sampling point at 80%.

Examples:
example/c/candump.c.

◆ canFD_BITRATE_500K_80P

#define canFD_BITRATE_500K_80P   (-1000)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 0.5 Mbit/s and sampling point at 80%.

Examples:
example/c/candump.c, and how-to/c/openChannels.c.

◆ canFD_BITRATE_8M_60P

#define canFD_BITRATE_8M_60P   (-1004)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 8.0 Mbit/s and sampling point at 60%.

Examples:
example/c/candump.c.

◆ canFD_BITRATE_8M_70P

#define canFD_BITRATE_8M_70P   (-1006)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 8.0 Mbit/s and sampling point at 70%.

◆ canFD_BITRATE_8M_80P

#define canFD_BITRATE_8M_80P   (-1005)

Used in canSetBusParams() and canSetBusParamsFd() when using the CAN FD protocol. Indicates a bitrate of 8.0 Mbit/s and sampling point at 80%.

◆ canFILTER_ACCEPT

#define canFILTER_ACCEPT   1

Sets the code for standard (11-bit) identifiers.

◆ canFILTER_NULL_MASK

#define canFILTER_NULL_MASK   0L

Sets the code for standard (11-bit) identifiers.

◆ canFILTER_REJECT

#define canFILTER_REJECT   2

Sets the code for standard (11-bit) identifiers.

◆ canFILTER_SET_CODE_EXT

#define canFILTER_SET_CODE_EXT   5

Sets the code for extended (29-bit) identifiers.

◆ canFILTER_SET_CODE_STD

#define canFILTER_SET_CODE_STD   3

Sets the code for standard (11-bit) identifiers.

◆ canFILTER_SET_MASK_EXT

#define canFILTER_SET_MASK_EXT   6

Sets the mask for extended (29-bit) identifiers.

◆ canFILTER_SET_MASK_STD

#define canFILTER_SET_MASK_STD   4

Sets the mask for standard (11-bit) identifiers.

◆ CanHandle

#define CanHandle   int

Handle to an opened circuit, created with canOpenChannel().

◆ canHWTYPE_ACQUISITOR

#define canHWTYPE_ACQUISITOR   46

Kvaser Acquisitor (obsolete).

◆ canHWTYPE_BAGEL

#define canHWTYPE_BAGEL   64

Obsolete name, use canHWTYPE_BLACKBIRD_V2 instead.

◆ canHWTYPE_BLACKBIRD

#define canHWTYPE_BLACKBIRD   58

Kvaser BlackBird.

◆ canHWTYPE_BLACKBIRD_V2

#define canHWTYPE_BLACKBIRD_V2   64

Kvaser BlackBird v2.

◆ canHWTYPE_CANLINHYBRID

#define canHWTYPE_CANLINHYBRID   84

Kvaser Hybrid CAN/LIN.

◆ canHWTYPE_CANPARI

#define canHWTYPE_CANPARI   3

CANpari (obsolete).

◆ canHWTYPE_DINRAIL

#define canHWTYPE_DINRAIL   86

Kvaser DIN Rail SE400S and variants.

◆ canHWTYPE_EAGLE

#define canHWTYPE_EAGLE   62

Kvaser Eagle family.

◆ canHWTYPE_ETHERCAN

#define canHWTYPE_ETHERCAN   70

Kvaser Ethercan.

◆ canHWTYPE_IRIS

#define canHWTYPE_IRIS   58

Obsolete name, use canHWTYPE_BLACKBIRD instead.

◆ canHWTYPE_LAPCAN

#define canHWTYPE_LAPCAN   2

LAPcan Family.

◆ canHWTYPE_LEAF

#define canHWTYPE_LEAF   48

Kvaser Leaf Family.

◆ canHWTYPE_LEAF2

#define canHWTYPE_LEAF2   80

Kvaser Leaf Pro HS v2 and variants.

◆ canHWTYPE_LEAF3

#define canHWTYPE_LEAF3   90

Kvaser Kvaser Leaf v3 and variants.

◆ canHWTYPE_MEMORATOR_II

#define canHWTYPE_MEMORATOR_II   54

Kvaser Memorator Professional family.

◆ canHWTYPE_MEMORATOR_LIGHT

#define canHWTYPE_MEMORATOR_LIGHT   60

Kvaser Memorator Light.

◆ canHWTYPE_MEMORATOR_PRO

#define canHWTYPE_MEMORATOR_PRO   54

Kvaser Memorator Professional family.

◆ canHWTYPE_MEMORATOR_PRO2

#define canHWTYPE_MEMORATOR_PRO2   78

Kvaser Memorator Pro 5xHS and variants.

◆ canHWTYPE_MEMORATOR_V2

#define canHWTYPE_MEMORATOR_V2   82

Kvaser Memorator (2nd generation)

◆ canHWTYPE_MINIHYDRA

#define canHWTYPE_MINIHYDRA   62

Obsolete name, use canHWTYPE_EAGLE instead.

◆ canHWTYPE_MINIPCIE

#define canHWTYPE_MINIPCIE   66

Kvaser Mini PCI Express.

◆ canHWTYPE_NONE

#define canHWTYPE_NONE   0

Unknown or undefined.

◆ canHWTYPE_PC104_PLUS

#define canHWTYPE_PC104_PLUS   50

Kvaser PC104+.

◆ canHWTYPE_PCCAN

#define canHWTYPE_PCCAN   8

PCcan Family.

◆ canHWTYPE_PCICAN

#define canHWTYPE_PCICAN   9

PCIcan Family.

◆ canHWTYPE_PCICAN_II

#define canHWTYPE_PCICAN_II   40

PCIcan II family.

◆ canHWTYPE_PCICANX_II

#define canHWTYPE_PCICANX_II   52

Kvaser PCIcanx II.

◆ canHWTYPE_PCIE_V2

#define canHWTYPE_PCIE_V2   76

Kvaser PCIEcan 4xHS and variants.

◆ canHWTYPE_SIMULATED

#define canHWTYPE_SIMULATED   44

Simulated CAN bus for Kvaser Creator (obsolete).

◆ canHWTYPE_U100

#define canHWTYPE_U100   88

Kvaser U100 and variants.

◆ canHWTYPE_USBCAN

#define canHWTYPE_USBCAN   11

USBcan (obsolete).

◆ canHWTYPE_USBCAN_II

#define canHWTYPE_USBCAN_II   42

USBcan II, USBcan Rugged, Kvaser Memorator.

◆ canHWTYPE_USBCAN_KLINE

#define canHWTYPE_USBCAN_KLINE   68

USBcan Pro HS/K-Line.

◆ canHWTYPE_USBCAN_LIGHT

#define canHWTYPE_USBCAN_LIGHT   72

Kvaser USBcan Light.

◆ canHWTYPE_USBCAN_PRO

#define canHWTYPE_USBCAN_PRO   56

Kvaser USBcan Professional.

◆ canHWTYPE_USBCAN_PRO2

#define canHWTYPE_USBCAN_PRO2   74

Kvaser USBcan Pro 5xHS and variants.

◆ canHWTYPE_VIRTUAL

#define canHWTYPE_VIRTUAL   1

The virtual CAN bus.

◆ canINVALID_HANDLE

#define canINVALID_HANDLE   (-1)

Indicates an invalid canHandle.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canIOCTL_CLEAR_ERROR_COUNTERS

#define canIOCTL_CLEAR_ERROR_COUNTERS   5

Note that CAN error counters are never updated on device and will be briefly changed back to their original values after this call.

This define is used in canIoCtl(), buf and buflen refers to this functions arguments.

Tells CANlib to clear the CAN error counters. The contents of buf and buflen is ignored. CAN error counters on device side are NOT updated.

Note
It is recommended to use canIOCTL_RESET_OVERRUN_COUNT to reset overrun status.
Not implemented in linux.
Examples:
example/cpp/candemo/candemo.cpp.

◆ canIOCTL_CONNECT_TO_VIRTUAL_BUS

#define canIOCTL_CONNECT_TO_VIRTUAL_BUS   22

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Connects the handle to a virtual bus. buf points to a unsigned int containing the virtual bus number (0..31).

Note
Not implemented in linux.

◆ canIOCTL_DISCONNECT_FROM_VIRTUAL_BUS

#define canIOCTL_DISCONNECT_FROM_VIRTUAL_BUS   23

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Disconnects the handle from a virtual bus. buf points to a unsigned int containing the virtual bus number (0..31).

Note
Not implemented in linux.

◆ canIOCTL_FLUSH_RX_BUFFER

#define canIOCTL_FLUSH_RX_BUFFER   10

This define is used in canIoCtl(), buf and buflen refers to this functions arguments.

Discard the current contents of the RX queue. The values of buf and buflen is ignored.

Note
This is the same thing as calling canFlushReceiveQueue()

◆ canIOCTL_FLUSH_TX_BUFFER

#define canIOCTL_FLUSH_TX_BUFFER   11

This define is used in canIoCtl(), buf and buflen refers to this functions arguments.

Discard the current contents of the TX queue. The values of buf and buflen is ignored.

Note
This is the same thing as calling canFlushTransmitQueue().
Examples:
example/cpp/candemo/candemo.cpp.

◆ canIOCTL_GET_BUS_TYPE

#define canIOCTL_GET_BUS_TYPE   36

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a DWORD that contains the kvBUSTYPE_GROUP_xxx bus type.

Note
Not implemented in linux.
Examples:
example/c/kvrConfig.c.

◆ canIOCTL_GET_CHANNEL_QUALITY

#define canIOCTL_GET_CHANNEL_QUALITY   34

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a 32-bit unsigned integer that receives the quality of the channel, where the quality is measured in percent of optimal quality.

For a WLAN, -90 dBm and -35 dBm are considered 0% and 100%, respectively.

The quality is 100% for any directly connected channel (USB, PCI etc.).

Note
Not implemented in linux.

◆ canIOCTL_GET_DEVNAME_ASCII

#define canIOCTL_GET_DEVNAME_ASCII   37

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a CHAR array of at least 32 characters which receives the current device name as a NULL terminated ASCII string.

If device name is not set or the device does not support this functionality, an error will be returned.

Note
Not implemented in linux.

◆ canIOCTL_GET_DRIVERHANDLE

#define canIOCTL_GET_DRIVERHANDLE   17

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a HANDLE which receives the Windows handle related to the CANlib handle.

Note
Not implemented in linux.

◆ canIOCTL_GET_EVENTHANDLE

#define canIOCTL_GET_EVENTHANDLE   14

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points at a HANDLE which receives a Windows Event handle which can be passed to the Win32 API WaitForSingleObject. The event is signaled when "something" (typically that a CAN message has been received or transmitted) happens in the driver.

Note
There is no more information available as to what happened when this call returns. The call may return on an "internal" event in CANlib and your application must be prepared to handle this (i.e. go to sleep again.)
If canWaitForEvent() returns with success status (canOK), you must call canRead() repeatedly until it returns canERR_NOMSG, before calling canWaitForEvent() again. This will flush the driver's internal event queues. Failure to call canRead() can cause canWaitForEvent() to get stuck in a state where it always sleeps for the specified timeout and then returns with canERR_TIMEOUT.
See also
canWaitForEvent()
Note
You must not set, reset, nor close this handle. Waiting on it is the only supported operation.
Not implemented in linux.
Examples:
example/c/gensig/gensig.c, and example/cpp/candemo/candemo.cpp.

◆ canIOCTL_GET_REPORT_ACCESS_ERRORS

#define canIOCTL_GET_REPORT_ACCESS_ERRORS   21

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a unsigned char which receives the current setting of the access error reporting (0 or 1.)

◆ canIOCTL_GET_ROUNDTRIP_TIME

#define canIOCTL_GET_ROUNDTRIP_TIME   35

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Returns the round trip time to a device.

buf points to a DWORD that contains the roundtrip time measured in milliseconds.

Note
Not implemented in linux.

◆ canIOCTL_GET_RX_BUFFER_LEVEL

#define canIOCTL_GET_RX_BUFFER_LEVEL   8

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points at a DWORD which receives the current RX queue level. The returned value is approximative, this is because not all hardware supports retrieving the queue levels. In that case a best-effort guess is returned. Also note that a device with embedded CPU will report its queue levels to the host computer after a short delay that depends on the bus traffic intensity, and consequently the value returned by the call to canIoCtl() might be a few milliseconds old.

◆ canIOCTL_GET_THROTTLE_SCALED

#define canIOCTL_GET_THROTTLE_SCALED   42

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

This ioctl can be used to set the responsitivity of some devices. buf points to a DWORD that should contain a value between 0 and 100. A value of 0 means that the device should be very responsive and a value of 100 means that the device generates less CPU load or requires more bandwidth. Note that not all devices support this. Some hardware will accept this command but neglect it. This can be found out by reading the scaled throttle.

Note
Not implemented in linux.

◆ canIOCTL_GET_TIME_SINCE_LAST_SEEN

#define canIOCTL_GET_TIME_SINCE_LAST_SEEN   38

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a DWORD that contains the time in milliseconds since the last communication occurred.

For WLAN devices, this is the time since the last keep-alive message.

Note
Not implemented in linux.

◆ canIOCTL_GET_TIMER_SCALE

#define canIOCTL_GET_TIMER_SCALE   12

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a DWORD which contains the desired time-stamp clock resolution in microseconds. Note that the accuracy of the clock isn't affected. The default value is 1000 microseconds, i.e. one millisecond.

◆ canIOCTL_GET_TREF_LIST

#define canIOCTL_GET_TREF_LIST   39

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Obtain the time reference list for MagiSync devices.

buf points to an array of pairs of 64-bit ints, one of which will contain the reference number and the other one the timestamp in nanoseconds.

Note
This function is subject to change in future releases and is not supported by Kvaser.

◆ canIOCTL_GET_TX_BUFFER_LEVEL

#define canIOCTL_GET_TX_BUFFER_LEVEL   9

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points at a DWORD which receives the current TX queue level. The returned value is approximative, this is because not all hardware supports retrieving the queue levels. In that case a best-effort guess is returned. Also note that a device with embedded CPU will report its queue levels to the host computer after a short delay that depends on the bus traffic intensity, and consequently the value returned by the call to canIoCtl() might be a few milliseconds old.

◆ canIOCTL_GET_TXACK

#define canIOCTL_GET_TXACK   31

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Returns the state of the Transmit Acknowledge as a DWORD in buf:

  • 0: Transmit Acknowledges is turned off.
  • 1: Transmit Acknowledges is turned on.
  • 2: Transmit Acknowledges is turned off, even for the driver's internal usage.

◆ canIOCTL_GET_USB_THROTTLE

#define canIOCTL_GET_USB_THROTTLE   29

This define is used in canIoCtl().

Note
This is only intended for internal use.

◆ canIOCTL_GET_USB_THROTTLE_SCALED

#define canIOCTL_GET_USB_THROTTLE_SCALED   42
Deprecated:
Use canIOCTL_GET_THROTTLE_SCALED instead
Note
Not implemented in linux.

◆ canIOCTL_GET_USER_IOPORT

#define canIOCTL_GET_USER_IOPORT   25

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a canUserIoPortData struct that contains a port number. After the call, the struct will contain the current value of the I/O port. This is used by special hardware only.

Note
Not implemented in linux.

◆ canIOCTL_GET_WAKEUP

#define canIOCTL_GET_WAKEUP   19

This define is used in canIoCtl().

Note
This is only intended for internal use.

◆ canIOCTL_LIN_MODE

#define canIOCTL_LIN_MODE   45

This define is used in canIoCtl(), buf mentioned below refers to an argument of that function.

Set the current LIN access mode returned in canCHANNELDATA_CHANNEL_FLAGS.

Note
This is only intended for internal use.

◆ canIOCTL_MAP_RXQUEUE

#define canIOCTL_MAP_RXQUEUE   18

This define is used in canIoCtl().

Note
This is only intended for internal use.

◆ canIOCTL_PREFER_EXT

#define canIOCTL_PREFER_EXT   1

This define is used in canIoCtl(), buf and buflen refers to this functions arguments.

Tells CANlib to "prefer" extended identifiers; that is, if you send a message with canWrite() and don't specify canMSG_EXT nor canMSG_STD, canMSG_EXT will be assumed and the most significant bits of the identifier will be cut off. The contents of buf and buflen is ignored. canRead() et al will set canMSG_EXT and/or canMSG_STD as usual and are not affected by this call.

Note
Not implemented in linux.

◆ canIOCTL_PREFER_STD

#define canIOCTL_PREFER_STD   2

This define is used in canIoCtl(), buf and buflen refers to this functions arguments.

Tells CANlib to "prefer" standard identifiers; that is, if you send a message with canWrite() and don't specify canMSG_EXT nor canMSG_STD, canMSG_STD will be assumed. The contents of buf and buflen are ignored. canRead() et al will set canMSG_EXT and/or canMSG_STD as usual and are not affected by this call.

Note
Not implemented in linux.

◆ canIOCTL_RESET_OVERRUN_COUNT

#define canIOCTL_RESET_OVERRUN_COUNT   44

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

This ioctl resets overrun count and flags,

See also
canReadStatus
canGetBusStatistics. The contents of buf and buflen is ignored.

◆ canIOCTL_SET_BRLIMIT

#define canIOCTL_SET_BRLIMIT   43

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Some hardware have a bitrate limit, which must be met when using any of canSetBusParams(), canSetBusParamsC200() and canSetBusParamsFd() functions. The bitrate limit can be overridden with this IOCTL. buf points to a unsigned long value that contains a user defined bitrate. A value of 0 means that the device should use its own default bitrate limit.
To find out which devices that have a bitrate limit, see canCHANNELDATA_MAX_BITRATE.

◆ canIOCTL_SET_BUFFER_WRAPAROUND_MODE

#define canIOCTL_SET_BUFFER_WRAPAROUND_MODE   26

This define is used in canIoCtl().

Note
This is only intended for internal use.

◆ canIOCTL_SET_BUSON_TIME_AUTO_RESET

#define canIOCTL_SET_BUSON_TIME_AUTO_RESET   30

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

This function enables or disables automatic time reset on bus on. By default, this is enabled, so the timer will automatically reset when a handle goes on bus.

buf points to a DWORD. If the value is zero, the CAN clock will not be reset at buson for the handle. Otherwise, the CAN clock will be reset at buson.

Default value is 1, the CAN clock will be reset at buson.

◆ canIOCTL_SET_BYPASS_MODE

#define canIOCTL_SET_BYPASS_MODE   15

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Note
Not yet implemented.

◆ canIOCTL_SET_ERROR_FRAMES_REPORTING

#define canIOCTL_SET_ERROR_FRAMES_REPORTING   33

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

This function turns error frame reporting on or off. If it is off, the channel handle will ignore any error frames it receives.

buf points to an unsigned byte. If the value is zero, the reporting of error frames is turned off for the handle. Otherwise, error frame reporting is turned on.

Default value is 1, error frame reporting is turned on.

Note
Not implemented in linux.

◆ canIOCTL_SET_LOCAL_TXACK

#define canIOCTL_SET_LOCAL_TXACK   46

This define is used in canIoCtl(), buf mentioned below refers to an argument of that function.

Enable reception of canMSG_LOCAL_TXACK When Local transmit acknowledge on a handle is enabled, the handle will receive messages with the canMSG_LOCAL_TXACK flag set every time a message is successfully transmitted on the bus by another handle using the same channel. It will not be received if it is sent on the same handle.

buf points to an unsigned int which contains

  • 0: to turn Local Transmit Acknowledges off.
  • 1: to turn Local Transmit Acknowledges on.

The default value is 0, Local Transmit Acknowledge is off.

◆ canIOCTL_SET_LOCAL_TXECHO

#define canIOCTL_SET_LOCAL_TXECHO   32

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to an unsigned byte. If the value is zero, the local transmit echo is turned off for the handle. Otherwise, local transmit echo is turned on.

Local transmit echo is turned on by default on all handles. This means that if two handles are open on the same channel, and a message is transmitted on the first handle, it will be received as a normal message on the second handle. Use the canIOCTL_SET_LOCAL_TXECHO function code to turn this function off, if it is not desired on a certain handle.

◆ canIOCTL_SET_REPORT_ACCESS_ERRORS

#define canIOCTL_SET_REPORT_ACCESS_ERRORS   20

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a unsigned char which contains

  • 0 to turn access error reporting off, and
  • 1 to turn access error reporting on.

Default value is 0, access error reporting off.

◆ canIOCTL_SET_RX_QUEUE_SIZE

#define canIOCTL_SET_RX_QUEUE_SIZE   27

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Use this function code to set the size of the receive buffer for a specific handle. buf points to an unsigned integer which contains the new size (number of messages) of the receive buffer.

The receive buffer consumes system non-paged pool memory, which is a limited resource. Do not increase the receive buffer size unless you have good reasons to do so.

Note
You can't use this function code when the channel is on bus.
Not implemented in linux.

◆ canIOCTL_SET_THROTTLE_SCALED

#define canIOCTL_SET_THROTTLE_SCALED   41

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

This ioctl can be used to set the responsitivity of some devices. buf points to a DWORD that should contain a value between 0 and 100. A value of 0 means that the device should be very responsive and a value of 100 means that the device generates less CPU load or requires more bandwidth. Note that not all devices support this. Some hardware will accept this command but neglect it. This can be found out by reading the scaled throttle.

Note
Not implemented in linux.

◆ canIOCTL_SET_TIMER_SCALE

#define canIOCTL_SET_TIMER_SCALE   6

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

The timer scale determines how precisely the channel's timestamps will be displayed without changing the accuracy of the clock. buf points to a DWORD which contains the desired time-stamp clock resolution in microseconds. If you want to change the resolution to 10 microseconds, set the value to 10. The default value is 1000, i.e. one millisecond.

Note
The accuracy of the clock isn't affected.

◆ canIOCTL_SET_TXACK

#define canIOCTL_SET_TXACK   7

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Enabling transmit Acknowledges on a channel results in that channel receiving a message with the TXACK flag enabled every time a message is successfully transmitted on the bus.

buf points to a DWORD which contains

  • 0: to turn Transmit Acknowledges off.
  • 1: to turn Transmit Acknowledges on.
    Deprecated:
  • 2: to turn Transmit Acknowledges off, even for the driver's internal usage. This might enhance performance but will cause some other APIs to stop working (for example, the current size of the transmit queue can not be read when this mode is active.)

The default value is 0, Transmit Acknowledge is off.

Examples:
example/cpp/candemo/candemo.cpp.

◆ canIOCTL_SET_TXRQ

#define canIOCTL_SET_TXRQ   13

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

Turns transmit requests on or off. If transmit requests are enabled on a channel, the channel will receive a message any time it writes a message to the channel.

buf points to a DWORD which contains

  • 0 to turn Transmit Requests off.
  • 1 to turn Transmit Requests on.

Default value is 0, Transmit Requests off.

◆ canIOCTL_SET_USB_THROTTLE

#define canIOCTL_SET_USB_THROTTLE   28

This define is used in canIoCtl().

Note
This is only intended for internal use.

◆ canIOCTL_SET_USB_THROTTLE_SCALED

#define canIOCTL_SET_USB_THROTTLE_SCALED   41
Deprecated:
Use canIOCTL_SET_THROTTLE_SCALED instead.
Note
Not implemented in linux.

◆ canIOCTL_SET_USER_IOPORT

#define canIOCTL_SET_USER_IOPORT   24

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a canUserIoPortData struct that contains a port number and a port value to set. This is used by special hardware only.

Note
Not implemented in linux.

◆ canIOCTL_SET_WAKEUP

#define canIOCTL_SET_WAKEUP   16

This define is used in canIoCtl().

Note
This is only intended for internal use.

◆ canIOCTL_TX_INTERVAL

#define canIOCTL_TX_INTERVAL   40

This define is used in canIoCtl(), buf mentioned below refers to this functions argument.

buf points to a DWORD that contains the number of microseconds the minimum CAN message transmit interval should be set to, or 0xffffffff to fetch the current setting. The minimum interval can not be set to more than one second.

When a CAN channel goes bus on, the minimum interval is set to zero. I.e. CAN transmissions happen at the maximum speed the device is capable of.

If the device does not support this functionality, or if an invalid minimum interval is requested, an error will be returned.

Note
The minimum CAN messages transmit interval applies to the physical CAN channel. It will thus affect all messages transmitted, even those sent using other CANlib handles to the same physical channel. The interval is defined as the time from the successful completion of one transmit to the beginning of the next one.

◆ canOBJBUF_AUTO_RESPONSE_RTR_ONLY

#define canOBJBUF_AUTO_RESPONSE_RTR_ONLY   0x01

This define is used in canObjBufSetFlags().

For auto-response buffers only. When this flag is in effect, the buffer will auto-respond to remote requests only. If this flag is not in effect, the buffer will auto-respond to both remote requests and ordinary data frames.

◆ canOBJBUF_TYPE_AUTO_RESPONSE

#define canOBJBUF_TYPE_AUTO_RESPONSE   0x01

The buffer is an auto-response buffer.

◆ canOBJBUF_TYPE_PERIODIC_TX

#define canOBJBUF_TYPE_PERIODIC_TX   0x02

The buffer is an auto-transmit buffer.

◆ canOPEN_ACCEPT_LARGE_DLC

#define canOPEN_ACCEPT_LARGE_DLC   0x0200

The channel will accept messages with DLC (Data Length Code) greater than 8. If this flag is not used, a message with DLC > 8 will always be reported or transmitted as a message with DLC = 8. If the canOPEN_ACCEPT_LARGE_DLC flag is used, the message will be sent and/or received with the true DLC, which can be at most 15.

Note
The length of the message is always at most 8.

This define is used in canOpenChannel().

◆ canOPEN_ACCEPT_VIRTUAL

#define canOPEN_ACCEPT_VIRTUAL   0x0020

Allow opening of virtual channels as well as physical channels.

This define is used in canOpenChannel().

See also
Virtual Channels
Examples:
example/c/candump.c, example/c/channeldata.c, example/cpp/candemo/candemo.cpp, tutorial/c/MonitorCanChannel.c, and tutorial/c/SendMessage.c.

◆ canOPEN_CAN_FD

#define canOPEN_CAN_FD   0x0400

The channel will use the CAN FD protocol, ISO compliant. This also means that messages with canFDMSG_xxx flags can now be used.

This define is used in canOpenChannel().

Examples:
example/c/busparams_tq.c, example/c/candump.c, example/c/channeldata.c, and how-to/c/openChannels.c.

◆ canOPEN_CAN_FD_NONISO

#define canOPEN_CAN_FD_NONISO   0x0800

The channel will use the CAN FD NON-ISO protocol. Use this if you want to configure the can controller to be able to communicate with a can controller designed prior to the release of the CAN FD ISO specification.

Non ISO mode implies:

  • The stuff bit counter will not be included in the frame format.
  • Initial value for CRC17 and CRC21 will be zero.

This also means that messages with canFDMSG_xxx flags can now be used.

This define is used in canOpenChannel().

◆ canOPEN_EXCLUSIVE

#define canOPEN_EXCLUSIVE   0x0008

Don't allow sharing of this CANlib channel.

Two or more threads or applications can share the same CAN channel by opening multiple handles to the same CANlib channel. If this is not desired you can open a single exclusive handle to a channel which is done by passing the canOPEN_EXCLUSIVE flag in the flags argument to canOpenChannel(). If a handle to the CANlib channel is already open, the call to canOpenChannel() will fail.

This define is used in canOpenChannel()

Examples:
example/c/canecho.c, example/c/kvdiag/autobaud.c, example/c/kvdiag/normal.c, example/c/kvrConfig.c, example/c/tx.c, and how-to/c/openChannels.c.

◆ canOPEN_INTERNAL_L

#define canOPEN_INTERNAL_L   0x1000

This is for internal use ONLY.

◆ canOPEN_NO_INIT_ACCESS

#define canOPEN_NO_INIT_ACCESS   0x0100

Don't open the handle with init access.

This define is used in canOpenChannel().

Note
A handle opened without init access will still set default bitrate when going on bus, if no other handle has opened the channel with init access at the time of the buson.
See also
canOPEN_REQUIRE_INIT_ACCESS
Examples:
example/c/channeldata.c.

◆ canOPEN_OVERRIDE_EXCLUSIVE

#define canOPEN_OVERRIDE_EXCLUSIVE   0x0040

Open the channel even if it is opened for exclusive access already.

Warning
Use this flag with caution.

This define is used in canOpenChannel().

Examples:
example/c/channeldata.c.

◆ canOPEN_REQUIRE_EXTENDED

#define canOPEN_REQUIRE_EXTENDED   0x0010

This flag causes two things to happen:

  • The call will fail if the specified circuit doesn't allow extended CAN (CAN 2.0B).
  • If no frame-type flag is specified in a call to canWrite, it is assumed that extended CAN should be used.

This define is used in canOpenChannel().

◆ canOPEN_REQUIRE_INIT_ACCESS

#define canOPEN_REQUIRE_INIT_ACCESS   0x0080

Fail the call if the channel cannot be opened with init access.

Init access means that the CAN handle can set bit rate and CAN driver mode. At most one CAN handle may have init access to any given channel. If you try to set the bit rate or CAN driver mode for a handle to which you don't have init access, the call will silently fail (i.e. canOK is returned although the call had no effect), unless you enable "access error reporting" by calling canIoCtl() using canIOCTL_SET_REPORT_ACCESS_ERRORS. Access error reporting is by default off. Init access is the default.

This define is used in canOpenChannel().

See also
canOPEN_NO_INIT_ACCESS, canIOCTL_SET_REPORT_ACCESS_ERRORS

◆ canTXEDATA_COMPILER_VERSION

#define canTXEDATA_COMPILER_VERSION   2

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a uint[3] array.

buffer points to an array of 3 32-bit unsigned integers which receives the three part version number of the compiler used to create the compiled script file (.txe).

Contents

  • 0: major
  • 1: minor
  • 2: build

◆ canTXEDATA_DATE

#define canTXEDATA_DATE   3

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a DateTime object.

buffer points to an array of 6 32-bit unsigned integers which receives the compilation date in Coordinated Universal Time (UTC) of the compiled script file (.txe).

Contents

  • 0: year
  • 1: mon
  • 2: day
  • 3: hour
  • 4: min
  • 5: sec

◆ canTXEDATA_DESCRIPTION

#define canTXEDATA_DESCRIPTION   4

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a string.

buffer points to an area which receives a zero-terminated string with a description of the compiled script file (.txe). If no description is available then bufsize is set to zero and no data is written into buffer.

◆ canTXEDATA_FILE_VERSION

#define canTXEDATA_FILE_VERSION   1

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a uint[3] array.

buffer points to an array of 3 32-bit unsigned integers which receives the three part version number of the compiled script file (.txe) file format.

Contents

  • 0: major
  • 1: minor
  • 2: build

◆ canTXEDATA_IS_ENCRYPTED

#define canTXEDATA_IS_ENCRYPTED   7

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a bool.

buffer points to a single unsigned integer which will receive a non-zero value if the compiled script file (.txe) contents is encrypted.

◆ canTXEDATA_SIZE_OF_CODE

#define canTXEDATA_SIZE_OF_CODE   6

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a uint.

buffer points to a single unsigned integer which receives the size of the compiled code of the compiled script file (.txe).

◆ canTXEDATA_SOURCE

#define canTXEDATA_SOURCE   5

This define is used in kvScriptTxeGetData(), buffer mentioned below refers to this functions argument.

C#
buffer contains a string.

buffer points to an area which receives a list containing the names and content of all source files which were used to generate the compiled script file (.txe).

The name followed by the content of each source file is written into buffer as consecutive zero-terminated strings.

If no source code is available or the container is encrypted, then bufsize is set to zero and no data is written into buffer.

◆ canVERSION_CANLIB32_BETA

#define canVERSION_CANLIB32_BETA   3

This define is used in canGetVersionEx() and controls what type of version number that is returned.

Returns 1 if the present version is a beta (preview) release, or 0 if it is an official release.

Note
In Linux, this depends on the define CANLIB_BETA

◆ canVERSION_CANLIB32_PRODVER

#define canVERSION_CANLIB32_PRODVER   1

This define is used in canGetVersionEx() and controls what type of version number that is returned.

Product version number of CANlib coded as an unsigned 16-bit word with the major version number in the upper byte and the minor version number in the lower byte. The product version number corresponds to the version number of the whole CANlib. For example, CANlib 2.27 would return 0x21B.

◆ canVERSION_CANLIB32_PRODVER32

#define canVERSION_CANLIB32_PRODVER32   2

This define is used in canGetVersionEx() and controls what type of version number that is returned.

Product version number of canlib32.dll coded as an unsigned 32-bit word where the bytes contain (in order from the most significant to the least significant byte) 0, major version number, minor version number, and the minor version letter. (The minor version letter is the ASCII code for the letter, or 0 (zero) if no letter). For example, CANlib 3.8 would return 0x00030800 and CANlib 3.8a would return 0x00030861.

◆ canVERSION_CANLIB32_VERSION

#define canVERSION_CANLIB32_VERSION   0

This define is used in canGetVersionEx() and controls which version number that returned.

Version number of the canlib32.dll file coded as an unsigned 16-bit word with the major version number in the upper byte and the minor version number in the lower byte. This version number is not related to the product version number of the whole CANlib. For example, canlib32.dll belonging to CANlib 2.27 would return 0x305.

Note
Linux returns version of libcanlib.so.

◆ canVERSION_DONT_ACCEPT_BETAS

#define canVERSION_DONT_ACCEPT_BETAS   0x02

This define is used in canProbeVersion(), major and minor refer to this functions arguments.

Return FALSE if a beta version (preview version) of CANlib is installed, regardless of its version number.

◆ canVERSION_DONT_ACCEPT_LATER

#define canVERSION_DONT_ACCEPT_LATER   0x01

This define is used in canProbeVersion(), major and minor refer to this functions arguments.

Require that exactly the version specified by major and minor be present. Earlier and later versions are not accepted. This flag does not affect the acceptance of beta versions.

◆ kvBUSTYPE_GROUP_INTERNAL

#define kvBUSTYPE_GROUP_INTERNAL   4

kvBUSTYPE_PCI, kvBUSTYPE_PCMCIA, ...

Note
Not implemented in linux.

◆ kvBUSTYPE_GROUP_LOCAL

#define kvBUSTYPE_GROUP_LOCAL   2

kvBUSTYPE_USB

Note
Not implemented in linux.
Examples:
example/c/kvrConfig.c.

◆ kvBUSTYPE_GROUP_REMOTE

#define kvBUSTYPE_GROUP_REMOTE   3

kvBUSTYPE_WLAN, kvBUSTYPE_LAN

Note
Not implemented in linux.

◆ kvBUSTYPE_GROUP_VIRTUAL

#define kvBUSTYPE_GROUP_VIRTUAL   1

kvBUSTYPE_VIRTUAL

Note
Not implemented in linux.

◆ kvBUSTYPE_ISA

#define kvBUSTYPE_ISA   6

Bus of type ISA

Note
Not inplemented in linux.

◆ kvBUSTYPE_LAN

#define kvBUSTYPE_LAN   9

Bus of type LAN

Note
Not inplemented in linux.

◆ kvBUSTYPE_NONE

#define kvBUSTYPE_NONE   0

Unkown bus type.

Note
Not inplemented in linux.

◆ kvBUSTYPE_PC104_PLUS

#define kvBUSTYPE_PC104_PLUS   8

Bus of type PC104+

Note
Not inplemented in linux.

◆ kvBUSTYPE_PCI

#define kvBUSTYPE_PCI   1

Bus of type PCI.

Note
Not inplemented in linux.

◆ kvBUSTYPE_PCI_EXPRESS

#define kvBUSTYPE_PCI_EXPRESS   5

Bus of type PCI Express

Note
Not inplemented in linux.

◆ kvBUSTYPE_PCMCIA

#define kvBUSTYPE_PCMCIA   2

Bus of type PCMCIA

Note
Not inplemented in linux.

◆ kvBUSTYPE_USB

#define kvBUSTYPE_USB   3

Bus of type USB

Note
Not inplemented in linux.

◆ kvBUSTYPE_VIRTUAL

#define kvBUSTYPE_VIRTUAL   7

Bus of type virtual

Note
Not inplemented in linux.

◆ kvBUSTYPE_WLAN

#define kvBUSTYPE_WLAN   4

Bus of type WLAN

Note
Not inplemented in linux.

◆ kvDEVICE_MODE_INTERFACE

#define kvDEVICE_MODE_INTERFACE   0x00

This define is used in kvDeviceSetMode() and kvDeviceGetMode().

Device is running or should be running in interface mode.

◆ kvDEVICE_MODE_LOGGER

#define kvDEVICE_MODE_LOGGER   0x01

This define is used in kvDeviceSetMode() and kvDeviceGetMode().

Device is running or should be running in logger mode.

◆ kvENVVAR_TYPE_FLOAT

#define kvENVVAR_TYPE_FLOAT   2

This define is used in kvScriptEnvvarOpen().

It defines the type of the envvar as float.

◆ kvENVVAR_TYPE_INT

#define kvENVVAR_TYPE_INT   1

This define is used in kvScriptEnvvarOpen().

It defines the type of the envvar as int.

Examples:
example/c/tscript/envvar/envvar.c.

◆ kvENVVAR_TYPE_STRING

#define kvENVVAR_TYPE_STRING   3

This define is used in kvScriptEnvvarOpen().

It defines the type of the envvar as string.

◆ kvEVENT_TYPE_KEY

#define kvEVENT_TYPE_KEY   1

This define is used in kvScriptSendEvent().

It defines an event of type "key pressed".

◆ kvIO_INFO_GET_AI_HYSTERESIS

#define kvIO_INFO_GET_AI_HYSTERESIS   11

This define is used in kvIoPinGetInfo().

A float that contains the hysteresis in volt for an analog input pin, i.e. the amount the input have to change before the sampled value is updated.

Note
This is only used for analog input pins.

◆ kvIO_INFO_GET_AI_LP_FILTER_ORDER

#define kvIO_INFO_GET_AI_LP_FILTER_ORDER   10

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer that contains the low-pass filter order for an analog input pin.

Note
This is only used for analog input pins.

◆ kvIO_INFO_GET_DI_HIGH_LOW_FILTER

#define kvIO_INFO_GET_DI_HIGH_LOW_FILTER   9

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from HIGH to LOW.

Note
This is only used for digital input pins.

◆ kvIO_INFO_GET_DI_LOW_HIGH_FILTER

#define kvIO_INFO_GET_DI_LOW_HIGH_FILTER   8

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from LOW to HIGH.

Note
This is only used for digital input pins.

◆ kvIO_INFO_GET_DIRECTION

#define kvIO_INFO_GET_DIRECTION   2

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer, see kvIO_PIN_DIRECTION_xxx. Read-only.

◆ kvIO_INFO_GET_FW_VERSION

#define kvIO_INFO_GET_FW_VERSION   16

This define is used in kvIoPinGetInfo() to get the FW version number.

An unsigned 32-bit integer that contains the software version number of the submodule the pin belongs to. This number consists of two 16-bit words, where the most significant word represents the major and the least significant the minor software version number. Read-only.

◆ kvIO_INFO_GET_MODULE_NUMBER

#define kvIO_INFO_GET_MODULE_NUMBER   14

This define is used in kvIoPinGetInfo() to get the module number.

An unsigned 32-bit integer that contains the module number the pin belongs to. The number starts from 0. Read-only.

◆ kvIO_INFO_GET_MODULE_TYPE

#define kvIO_INFO_GET_MODULE_TYPE   1

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer, see kvIO_MODULE_TYPE_xxx. Read-only.

◆ kvIO_INFO_GET_NUMBER_OF_BITS

#define kvIO_INFO_GET_NUMBER_OF_BITS   5

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer that contains the resolution in number of bits. Read-only.

◆ kvIO_INFO_GET_PIN_TYPE

#define kvIO_INFO_GET_PIN_TYPE   4

This define is used in kvIoPinGetInfo().

An unsigned 32-bit integer, see kvIO_PIN_TYPE_xxx. Read-only.

◆ kvIO_INFO_GET_RANGE_MAX

#define kvIO_INFO_GET_RANGE_MAX   7

This define is used in kvIoPinGetInfo().

A float that contains the upper range limit in volts. Read-only.

Note
This is not applicable for relay pins.

◆ kvIO_INFO_GET_RANGE_MIN

#define kvIO_INFO_GET_RANGE_MIN   6

This define is used in kvIoPinGetInfo().

A float that contains the lower range limit in volts. Read-only.

Note
This is not applicable for relay pins.

◆ kvIO_INFO_GET_SERIAL_NUMBER

#define kvIO_INFO_GET_SERIAL_NUMBER   15

This define is used in kvIoPinGetInfo() to get the serial number.

An unsigned 32-bit integer that contains the serial number of the submodule the pin belongs to. Read-only.

◆ kvIO_INFO_SET_AI_HYSTERESIS

#define kvIO_INFO_SET_AI_HYSTERESIS   11

This define is used in kvIoPinSetInfo().

A float that contains the hysteresis in volt for an analog input pin, i.e. the amount the input have to change before the sampled value is updated.

Note
This is only used for analog input pins.

◆ kvIO_INFO_SET_AI_LP_FILTER_ORDER

#define kvIO_INFO_SET_AI_LP_FILTER_ORDER   10

This define is used in kvIoPinSetInfo().

An unsigned 32-bit integer that contains the low-pass filter order for an analog input pin.

Note
This is only used for analog input pins.

◆ kvIO_INFO_SET_DI_HIGH_LOW_FILTER

#define kvIO_INFO_SET_DI_HIGH_LOW_FILTER   9

This define is used in kvIoPinSetInfo().

An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from HIGH to LOW.

Note
This is only used for digital input pins.

◆ kvIO_INFO_SET_DI_LOW_HIGH_FILTER

#define kvIO_INFO_SET_DI_LOW_HIGH_FILTER   8

This define is used in kvIoPinSetInfo().

An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from LOW to HIGH.

Note
This is only used for digital input pins.

◆ kvIO_MODULE_TYPE_ANALOG

#define kvIO_MODULE_TYPE_ANALOG   2

Kvaser Add-on module with analog inputs and analog outputs

◆ kvIO_MODULE_TYPE_DIGITAL

#define kvIO_MODULE_TYPE_DIGITAL   1

Kvaser Add-on module with digital inputs and digital outputs

◆ kvIO_MODULE_TYPE_INTERNAL

#define kvIO_MODULE_TYPE_INTERNAL   4

Kvaser built-in module with digital inputs and digital outputs

◆ kvIO_MODULE_TYPE_RELAY

#define kvIO_MODULE_TYPE_RELAY   3

Kvaser Add-on module with relays and digital inputs

◆ kvIO_PIN_DIRECTION_IN

#define kvIO_PIN_DIRECTION_IN   4

Input

◆ kvIO_PIN_DIRECTION_OUT

#define kvIO_PIN_DIRECTION_OUT   8

Output

◆ kvIO_PIN_TYPE_ANALOG

#define kvIO_PIN_TYPE_ANALOG   2

Analog

◆ kvIO_PIN_TYPE_DIGITAL

#define kvIO_PIN_TYPE_DIGITAL   1

Digital

◆ kvIO_PIN_TYPE_RELAY

#define kvIO_PIN_TYPE_RELAY   3

Relay

◆ kvLED_ACTION_ALL_LEDS_OFF

#define kvLED_ACTION_ALL_LEDS_OFF   1

Turn all LEDs off.

◆ kvLED_ACTION_ALL_LEDS_ON

#define kvLED_ACTION_ALL_LEDS_ON   0

Turn all LEDs on.

◆ kvLED_ACTION_LED_0_OFF

#define kvLED_ACTION_LED_0_OFF   3

Turn LED 0 off.

◆ kvLED_ACTION_LED_0_ON

#define kvLED_ACTION_LED_0_ON   2

Turn LED 0 on.

◆ kvLED_ACTION_LED_10_OFF

#define kvLED_ACTION_LED_10_OFF   23

Turn LED 10 off.

◆ kvLED_ACTION_LED_10_ON

#define kvLED_ACTION_LED_10_ON   22

Turn LED 10 on.

◆ kvLED_ACTION_LED_11_OFF

#define kvLED_ACTION_LED_11_OFF   25

Turn LED 11 off.

◆ kvLED_ACTION_LED_11_ON

#define kvLED_ACTION_LED_11_ON   24

Turn LED 11 on.

◆ kvLED_ACTION_LED_1_OFF

#define kvLED_ACTION_LED_1_OFF   5

Turn LED 1 off.

◆ kvLED_ACTION_LED_1_ON

#define kvLED_ACTION_LED_1_ON   4

Turn LED 1 on.

◆ kvLED_ACTION_LED_2_OFF

#define kvLED_ACTION_LED_2_OFF   7

Turn LED 2 off.

◆ kvLED_ACTION_LED_2_ON

#define kvLED_ACTION_LED_2_ON   6

Turn LED 2 on.

◆ kvLED_ACTION_LED_3_OFF

#define kvLED_ACTION_LED_3_OFF   9

Turn LED 3 off.

◆ kvLED_ACTION_LED_3_ON

#define kvLED_ACTION_LED_3_ON   8

Turn LED 3 on.

◆ kvLED_ACTION_LED_4_OFF

#define kvLED_ACTION_LED_4_OFF   11

Turn LED 4 off.

◆ kvLED_ACTION_LED_4_ON

#define kvLED_ACTION_LED_4_ON   10

Turn LED 4 on.

◆ kvLED_ACTION_LED_5_OFF

#define kvLED_ACTION_LED_5_OFF   13

Turn LED 5 off.

◆ kvLED_ACTION_LED_5_ON

#define kvLED_ACTION_LED_5_ON   12

Turn LED 5 on.

◆ kvLED_ACTION_LED_6_OFF

#define kvLED_ACTION_LED_6_OFF   15

Turn LED 6 off.

◆ kvLED_ACTION_LED_6_ON

#define kvLED_ACTION_LED_6_ON   14

Turn LED 6 on.

◆ kvLED_ACTION_LED_7_OFF

#define kvLED_ACTION_LED_7_OFF   17

Turn LED 7 off.

◆ kvLED_ACTION_LED_7_ON

#define kvLED_ACTION_LED_7_ON   16

Turn LED 7 on.

◆ kvLED_ACTION_LED_8_OFF

#define kvLED_ACTION_LED_8_OFF   19

Turn LED 8 off.

◆ kvLED_ACTION_LED_8_ON

#define kvLED_ACTION_LED_8_ON   18

Turn LED 8 on.

◆ kvLED_ACTION_LED_9_OFF

#define kvLED_ACTION_LED_9_OFF   21

Turn LED 9 off.

◆ kvLED_ACTION_LED_9_ON

#define kvLED_ACTION_LED_9_ON   20

Turn LED 9 on.

◆ kvLOGGER_TYPE_NOT_A_LOGGER

#define kvLOGGER_TYPE_NOT_A_LOGGER   0

◆ kvLOGGER_TYPE_V1

#define kvLOGGER_TYPE_V1   1

◆ kvLOGGER_TYPE_V2

#define kvLOGGER_TYPE_V2   2

◆ kvREMOTE_TYPE_LAN

#define kvREMOTE_TYPE_LAN   2

◆ kvREMOTE_TYPE_NOT_REMOTE

#define kvREMOTE_TYPE_NOT_REMOTE   0

◆ kvREMOTE_TYPE_WLAN

#define kvREMOTE_TYPE_WLAN   1

◆ kvSCRIPT_REQUEST_TEXT_ALL_SLOTS

#define kvSCRIPT_REQUEST_TEXT_ALL_SLOTS   255

Select all script slots.

◆ kvSCRIPT_REQUEST_TEXT_SUBSCRIBE

#define kvSCRIPT_REQUEST_TEXT_SUBSCRIBE   2

Subscribe to printf messages from script slots.

◆ kvSCRIPT_REQUEST_TEXT_UNSUBSCRIBE

#define kvSCRIPT_REQUEST_TEXT_UNSUBSCRIBE   1

Cancel subscription of printf messages from script slots.

◆ kvSCRIPT_STATUS_LOADED

#define kvSCRIPT_STATUS_LOADED   1

The slot is loaded with a script

◆ kvSCRIPT_STATUS_RUNNING

#define kvSCRIPT_STATUS_RUNNING   2

The slot is running a script.

◆ kvSCRIPT_STOP_FORCED

#define kvSCRIPT_STOP_FORCED   -9

Request termination of a hanged script

◆ kvSCRIPT_STOP_NORMAL

#define kvSCRIPT_STOP_NORMAL   0

Stop a running script

Examples:
example/c/tscript/envvar/envvar.c.

◆ WM__CANLIB

#define WM__CANLIB   (WM_USER+16354)

Notify message sent to the application window

Examples:
example/c/tscript/envvar/envvar.c.

Typedef Documentation

◆ canBusStatistics

This struct is returned by canGetBusStatistics()

The values are cleared when the corresponding channel goes on bus.

◆ canHandle

typedef int canHandle

Handle to an opened circuit, created with canOpenChannel().

◆ kvBusParamLimits

Returned when using canCHANNELDATA_BUS_PARAM_LIMITS

This struct shows the low level limits of the parameters.

The tq field is always zero for both min/max arbitration/data, and is reserved for possible other uses in future releases.

If prop is zero for both min and max values, that means that the unit does not distinguish between phase segment one and the propagation segment, i.e. the limit applies to (phase1 + prop).

Note
This is only intended for internal use.

◆ kvCallback_t

typedef void(__stdcall * kvCallback_t) (int hnd, void *context, unsigned int notifyEvent)

kvCallback_t is used by the function kvSetNotifyCallback()

The callback function, on Windows required to be a __stdcall function, should be called with the following arguments:

  • hnd - the handle of the CAN channel where the event happened.
  • context - the context pointer you passed to kvSetNotifyCallback().
  • notifyEvent - one of the canNOTIFY_xxx notification codes.
Note
It is really the canNOTIFY_xxx codes, and not the canEVENT_xxx codes that the canSetNotify() API is using.
The default calling convention for C/C++ programs on Windows is __cdecl.
On Linux, the default calling convention is used.
See also
Receiving Using Callback Function

◆ kvClockInfo

typedef struct kvClockInfo kvClockInfo

Returned when using canCHANNELDATA_CLOCK_INFO

Returns clock characteristics for device.

The device clock frequency can then be calculated as:

double frequency = numerator/denominator * 10 ** power_of_ten;

◆ kvEnvHandle

typedef __int64 kvEnvHandle

A handle to a t-script envvar. Returned by the function kvScriptEnvvarOpen().

◆ kvStatus

Contains status codes according to canSTAT_xxx.

◆ kvTimeDomain

typedef void* kvTimeDomain

Used for time domain handling.

◆ kvTimeDomainData

Used for time domain handling.

Function Documentation

◆ canWaitForEvent()

canStatus canWaitForEvent ( const int  hnd,
DWORD  timeout 
)
C#
static Canlib.canStatus canWaitForEvent(CanHandle hnd, Int64 timeout);
Delphi
function canWaitForEvent(hnd: canHandle; timeout: Cardinal): canStatus;

Waits for an event (of any kind) to happen at the specified CAN circuit, or a timeout to occur. An event in this context means for example the arrival of a CAN message or a CAN bus status change, but it can also be an event internal to the driver.

Parameters
[in]hndA handle to an open CAN circuit.
[in]timeoutThe number of milliseconds to wait before the call returns, if no event occurs. 0xFFFFFFFF gives an infinite timeout.
Returns
canOK (zero) if an event happened during the specified time period.
canERR_TIMEOUT (negative) if nothing happened during the specified time period.
canERR_xxx (negative) if failure.
See also
Receiving Using Event Handle
canRead()
Note
Not implemented in linux.

◆ kvFileCopyFromDevice()

kvStatus kvFileCopyFromDevice ( const int  hnd,
char *  deviceFileName,
char *  hostFileName 
)
C#
static Canlib.kvStatus kvFileCopyFromDevice(CanHandle hnd, String deviceFileName, String hostFileName);
Delphi
function kvFileCopyFromDevice(hnd: canHandle; deviceFileName: PAnsiChar; hostFileName: PAnsiChar): kvStatus;

The kvFileCopyFromDevice() function copies an arbitrary file from the device to the host.

Parameters
[in]hndAn open handle to a CAN channel.
[in]deviceFileNameThe device file name; a pointer to a NULL terminated array of chars.
[in]hostFileNameThe target host file name; a pointer to a NULL terminated array of chars.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure
See also
kvFileCopyToDevice()

◆ kvFileCopyToDevice()

kvStatus kvFileCopyToDevice ( const int  hnd,
char *  hostFileName,
char *  deviceFileName 
)
C#
static Canlib.kvStatus kvFileCopyToDevice(CanHandle hnd, String hostFileName, String deviceFileName);
Delphi
function kvFileCopyToDevice(hnd: canHandle; hostFileName: PAnsiChar; deviceFileName: PAnsiChar): kvStatus;

The kvFileCopyToDevice() function copies an arbitrary file from the host to the device.

Parameters
[in]hndAn open handle to a CAN channel.
[in]hostFileNameThe host file name; a pointer to a NULL terminated array of chars.
[in]deviceFileNameThe target device file name; a pointer to a NULL terminated array of chars.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure
See also
kvFileCopyFromDevice(), kvFileDelete()
Copying files from / to device

◆ kvFileDelete()

kvStatus kvFileDelete ( const int  hnd,
char *  deviceFileName 
)
C#
static Canlib.kvStatus kvFileDelete(CanHandle hnd, String deviceFileName);
Delphi
function kvFileDelete(hnd: canHandle; deviceFileName: PAnsiChar): kvStatus;

The kvFileDelete() function deletes a file on the device.

Note
Deleting system files is not recommended.
Parameters
[in]hndAn open handle to a CAN channel.
[in]deviceFileNameThe file on the device to delete; a pointer to a NULL terminated array of chars.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure
See also
kvFileCopyToDevice()

◆ kvFileDiskFormat()

kvStatus kvFileDiskFormat ( const int  hnd)
C#
static Canlib.canStatus kvFileDiskFormat(CanHandle hnd);
Delphi
function kvFileDiskFormat(hnd: canHandle): kvStatus;

The kvFileDiskFormat() function is used for formating the disk, back to FAT32.

Parameters
[in]hndAn open handle to a CAN channel.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure

◆ kvFileGetCount()

kvStatus kvFileGetCount ( const int  hnd,
int *  count 
)
C#
static Canlib.kvStatus kvFileGetCount(CanHandle hnd, out Int32 count);
Delphi
function kvFileGetCount(hnd: canHandle; var count: Integer): kvStatus;

The kvFileGetCount() function returns the number of files.

Parameters
[in]hndAn open handle to a CAN channel.
[out]countA pointer to a 32-bit integer that will receive the file count.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure
See also
kvFileGetName(), kvFileGetSystemData()

◆ kvFileGetName()

kvStatus kvFileGetName ( const int  hnd,
int  fileNo,
char *  name,
int  namelen 
)
C#
static Canlib.kvStatus kvFileGetName(CanHandle hnd, Int32 fileNo, out String name);
Delphi
function kvFileGetName(hnd: canHandle; fileNo: Integer; name: PAnsiChar; namelen: Integer): kvStatus;

The kvFileGetName() function returns the name of the file with number fileNo.

Parameters
[in]hndAn open handle to a CAN channel.
[in]fileNoThe number of the file.
[out]nameA buffer that will contain the name of the file. The name is a zero-terminated ASCII string.
[in]namelenThe length, in bytes, of the name buffer.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure
See also
kvFileGetCount(), kvFileGetSystemData()

◆ kvFileGetSystemData()

kvStatus kvFileGetSystemData ( const int  hnd,
int  itemCode,
int *  result 
)
C#
static Canlib.kvStatus kvFileGetSystemData(CanHandle hnd, Int32 itemCode, out Int32 result);
Delphi
function kvFileGetSystemData(hnd: canHandle; itemCode: Integer; var result: Integer): kvStatus;

The kvFileGetSystemData() function is used for reading disk parameters, e.g. size, max number of (user) files, etc.

Note
Not yet implemented
Parameters
[in]hndAn open handle to a CAN channel.
[in]itemCodeThe item we want information on.
[out]resultA pointer to a 32-bit integer that will receive the result.
Returns
canOK (zero) if success
canERR_xxx (negative) if failure