Kvaser.CanLib Maximum size of strings. This struct is returned by Number of received standard (11-bit identifiers) data frames. Number of received standard (11-bit identifiers) remote frames. Number of received extended (29-bit identifiers) data frames. Number of received extended (29-bit identifiers) remote frames. Number of error frames The bus load, expressed as an integer in the interval 0 - 10000 representing 0.00% - 100.00% bus load. The number of overruns detected by the hardware, firmware or driver. This struct is returned in and .C Port number. Port value. The canlib DLL is a library for interacting with the CAN bus. This routine sets the message acceptance filters on a CAN channel. On some boards the acceptance filtering is done by the CAN hardware; on other boards(typically those with an embedded CPU,) the acceptance filtering is done by software. behaves in the same way for all boards, however. and both serve the same purpose but the former can set the code and mask in just one call. If you want to remove a filter, call with the mask set to 0. Note You can set the extended code and mask only on CAN boards that support extended identifiers. Acceptance filters for 11-bit and 29-bit (ext) are independent, meaning 11-bit filters will not affect 29-bit can frames and vice versa. Not all CAN boards support different masks for standard and extended CAN identifiers. An open handle to a CAN circuit. The mask or code to set. Any of , , or if success else canStatus.canERR_XXX. Takes the specified handle off-bus. If no other handle is active on the same channel, the channel will also be taken off-bus An open handle to a CAN channel. if success else canStatus.canERR_XXX. Takes the specified channel on-bus. If you are using multiple handles to the same physical channel, for example if you are writing a threaded application, you must call once for each handle. The same applies to canBusOff() - the physical channel will not go off bus until the last handle to the channel goes off bus. An open handle to a CAN channel. if success else canStatus.canERR_XXX. Closes the channel associated with the handle. If no other threads are using the CAN circuit, it is taken off bus. The handle can not be used for further references to the channel. An open handle to a CAN channel. if success else canStatus.canERR_XXX. This function removes all received messages from the handle's receive queue. Other handles open to the same channel are not affected by this operation. That is, only the messages belonging to the handle you are passing to canFlushReceiveQueue are discarded. Note: This call has the same effect as calling with a function code of . A handle to an open circuit. if success else canStatus.canERR_XXX. This function removes all messages pending transmission from the transmit queue of the circuit. Note: If there are other handles open to the same circuit, they are also flushed.This call has the same effect as calling with a function code of . A handle to an open circuit. if success else canStatus.canERR_XXX. This function retrieves the current CAN controller driver type. This corresponds loosely to the bus output control register in the CAN controller, hence the name of this function. CANlib does not allow for direct manipulation of the bus output control register; instead, symbolic constants are used to select the desired driver type.   Note: Don't confuse the CAN controller driver type with the bus driver type. The CAN controller is not connected directly to the CAN bus; instead, it is connected to a bus transceiver circuit which interfaces directly to the bus. The "CAN controller driver type" we are talking about here refers to the mode which the CAN controller uses to drive the bus transceiver circuit.Silent Mode is not supported by all CAN controllers. An open handle to a CAN circuit. A reference to an int which receives the current driver type. The driver type can be either or . if success else canStatus.canERR_XXX. This function retrieves the current nominal bus parameters for the specified channel. The anatomy of a CAN bit is discussed in detail at Kvaser's web site at www.kvaser.com. An open handle to a CAN controller. Bit rate (bits per second). Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. The Synchronization Jump Width. The number of sampling points; can be 1 or 3. if success else canStatus.canERR_XXX. This function retrieves the current data bus parameters for the specified CAN FD channel. An open handle to a CAN FD controller. Bit rate (bits per second). Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. The Synchronization Jump Width. if success else canStatus.canERR_XXX. The function retrieves the latest bus statistics figures reported by the driver. You request the bus statistics from the driver by calling the function. An open handle to a CAN channel. A reference to a canBusStatistics struct that will receive the bus statistics figures. if success else canStatus.canERR_XXX. This function retrieves the current CAN bus driver mode. This is typically a mode like sleep, wakeup, standby, fast mode, etc. The different modes are almost always hardware dependent and requires special DRVcan cables. As an example, the DRVcan S implements J2411 compliant single-wire CAN and supports four line modes, namely Normal, Sleep, Fast and Wakeup. Standard ISO 11898 CAN do not support any of these bus driver modes.   Note: The bus driver mode is typically used to control things like one- or two-wire mode, sleep mode, and so on. It requires special support in the CAN driver circuit. Not implemented in Linux An open handle to a CAN circuit. A reference to an int which receives the current line mode (canTRANSCEIVER_LINEMODE_xxx). A reference to an int which receives the current resnet mode. This value is usually except for special DRVcan cables. if success else canStatus.canERR_XXX. This function translates an error code (canERR_xxx) to a human-readable, English text. The error code. A reference to a string containing the error text if success else canStatus.canERR_XXX. This function can be used to retrieve certain pieces of information about a channel. You must pass a channel number and not a channel handle. The number of the channel you are interested in. Channel numbers are integers in the interval beginning at 0 (zero) and ending at the value returned by , minus 1. This parameter specifies what data to obtain for the specified channel. The value is one of the constants canCHANNELDATA_xxx. The Object with received data. if success else canStatus.canERR_XXX. This function can be used to retrieve certain pieces of information about an open handle to a CANlib channel. An open handle to a CAN channel. This parameter specifies what data to obtain for the specified handle. The value is one of the constants canCHANNELDATA_xxx return value as a object This function returns the number of available CAN channels in the computer. The virtual channels are included in this number. A reference to an Int32 which will receive the current number of channels. if success else canStatus.canERR_XXX. This function recreates the channel table and returns the number of available CAN channels in the computer. The virtual channels are included in this number. A reference to an Int32 which will receive the current number of channels. if success else canStatus.canERR_XXX. This API call returns the version of the CANlib API DLL (canlib32.dll). The most significant byte is the major version number and the least significant byte is the minor version number. The actual version of the different driver files can be obtained by studying the version resources in each of the files.   Note: The version number of the canlib32.dll file is not related to the product version of CANlib you are using. CANlib consists of several driver and DLL files. To obtain the product version, use . Version number of canlib32.dll   Note: Linux returns version number from libcanlib.so This function returns various version numbers from the driver routines. Specifies which version number to retrieve. See canVERSION_CANLIB32_xxx The return value is the desired version number. This function must be called before any other functions are used. It will initialize the driver. You may call more than once. The actual initialization will take place only once. Any errors encountered during library initialization will be "silent" and an appropriate canERR_xxx error code will be returned later on when (or any other API call that requires initialization) is called. This function performs several different functions defined as CanIOCTL_xxx. The functions are handle-specific unless otherwise noted; this means that they affect only the handle you pass to canIoCtl(), whereas other open handles will remain unaffected. The contents of val after the call is dependent on the function code you specified. A handle to an open circuit. A canIOCTL_xxx function code . Value to Get if success else canStatus.canERR_XXX. This function performs several different functions defined as CanIOCTL_xxx. The functions are handle-specific unless otherwise noted; this means that they affect only the handle you pass to canIoCtl(), whereas other open handles will remain unaffected. The contents of val after the call is dependent on the function code you specified. A handle to an open circuit. A canIOCTL_xxx function code . Return value as String if success else canStatus.canERR_XXX. This function performs several different functions defined as CanIOCTL_xxx. The functions are handle-specific unless otherwise noted; this means that they affect only the handle you pass to canIoCtl(), whereas other open handles will remain unaffected. The contents of val after the call is dependent on the function code you specified. A handle to an open circuit. A canIOCTL_xxx function code . Set/Get value as an Object if success else canStatus.canERR_XXX. Allocates an object buffer associated with a handle to a CAN circuit. An open handle to a CAN circuit. The type of the buffer. A buffer index (zero or positive) if success. canERR_xxx (negative) if failure Disables the object buffer with the specified index. An open handle to a CAN circuit. The index of the buffer. if success else canStatus.canERR_XXX. Enables the object buffer with the specified index. An open handle to a CAN circuit. The index of the object buffer to enable. if success else canStatus.canERR_XXX. Deallocates the object buffer with the specified index. The buffer can not be referenced after this operation. An open handle to a CAN circuit. The object buffer to deallocate. if success else canStatus.canERR_XXX. Deallocates all object buffers on the specified handle. The buffers cannot be referenced after this operation. An open handle to a CAN circuit. if success else canStatus.canERR_XXX. The canObjBufSendBurst function sends a burst of CAN messages. You have to set up an object buffer first with the message to send. The messages will be sent as fast as possible from the hardware.   This function is intended for certain diagnostic applications. An open handle to a CAN channel. The index of a CAN object buffer. The number of messages to send. if success else canStatus.canERR_XXX. Defines a message reception filter on the specified object buffer. Messages not matching the filter are discarded. Note: For an auto response buffer, set the code and mask that together define the identifier(s) that trigger(s) the automatic response. An open handle to a CAN circuit. The index of the object buffer on which the filter is to be set. The acceptance code in the filter. The acceptance mask in the filter. if success else canStatus.canERR_XXX. Sets object buffer flags on a specified object buffer. An open handle to a CAN circuit. The buffer on which the flags are to be set. Specifies a combination of zero or more of the canOBJBUF_AUTO_RESPONSE_xxx flag values. if success else canStatus.canERR_XXX. The canObjBufSetMsgCount function sets the message count for an auto transmit object buffer. An open handle to a CAN channel. The index of a CAN object buffer. The message count. if success else canStatus.canERR_XXX. The canObjBufSetPeriod function sets the transmission period for an auto transmission object buffer. An open handle to a CAN channel. The index of a CAN object buffer. The transmission interval, in microseconds. if success else canStatus.canERR_XXX. Defines the contents of a specific object buffer. An open handle to a CAN circuit. The index of the object buffer whose contents is to be defined. The CAN identifier of the message. The contents of the message. The length of the message in bytes. For Classic CAN dlc can be at most 8, unless is used. For CAN FD dlc can be one of the following 0-8, 12, 16, 20, 24, 32, 48, 64. Message flags; a combination of the canMSG_xxx flags. if success else canStatus.canERR_XXX. Opens a CAN channel (circuit) and returns a handle which is used in subsequent calls to CANlib. You can open the same channel from multiple threads, but you must call once per thread. The number of the channel. Channel numbering is hardware dependent. A combination of canOPEN_xxx flags Returns a handle to the opened circuit, or canERR_xxx (negative) if the call failed. This function writes the current set of named parameters to the Registry. Previous entries are erased. The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER AB\CANLIB32\PredefinedBitrates key in the Registry. Note You must have Administrator's rights to write to the Registry. if success else canStatus.canERR_XXX. This function creates a new entry in the table of named parameter settings. The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER AB\CANLIB32\PredefinedBitrates key in the Registry. Note You must have Administrator's rights to write to the Registry. The index of the created entry (zero or positive) if success else canStatus.canERR_XXX. This function deletes the entry in the table of named parameter settings with the given index. The entries below (i.e. with higher indices) the deleted entry are moved up one step in the table. The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER AB\CANLIB32\PredefinedBitrates key in the Registry. The index of the entry to delete. if success else canStatus.canERR_XXX. This function returns the index of the parameter setting with the given name. The name of the setting. The index of the setting (zero or positive) if success else canStatus.canERR_XXX. This function retrieves the bus parameters associated with the entry with the given index in the table of named parameter settings. The index of the entry in the table of named parameter settings. Bit rate (bits per second). Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. The Synchronization Jump Width. The number of sampling points; can be 1 or 3. if success else canStatus.canERR_XXX. This function returns the channel number of the entry with the given index in the table of named parameter settings. The index of the entry in the table of named parameter settings. The channel number of the entry in question (zero or positive) if success else canStatus.canERR_XXX. This function returns the number of entries in the table of named channels. The number of channels (zero or positive) if success else canStatus.canERR_XXX. This function returns the name of a given entry in the list of named parameters. The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER AB\CANLIB32\PredefinedBitrates key in the Registry. The index of the entry in the named parameters list, whose name is to be returned. A reference to a string that is to receive the name. if success else canStatus.canERR_XXX. This function sets or changes the bus parameters for a given entry in the list of named parameters. Note: The bus parameters are not checked for validity. The index of the entry in the named parameter list whose parameters are to be set or changed. Bit rate (measured in bits per second); or one of the predefined constants canBITRATE_xxx. Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. The Synchronization Jump Width. The number of sampling points; can be 1 or 3. if success else canStatus.canERR_XXX. This function sets the channel number for a specified entry in the list of named parameters. Channels are numbered from 0 and up. The index of the entry in the named parameter list whose channel number is to be set. The channel number if success else canStatus.canERR_XXX. This function sets or changes the name of a named parameter. The index of the named parameter whose name is to be changed or set. A string that contains the new name. If the string is longer than the maximum allowed name length, it is truncated. if success else canStatus.canERR_XXX. This function swaps two entries in the list of named parameters. The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER AB\CANLIB32\PredefinedBitrates key in the Registry. The first of the two entries that are to be swapped in the named parameters list. The second of the two entries that are to be swapped in the named parameters list. if success else canStatus.canERR_XXX. This function checks whether a specific version of CANlib is installed on the system. The default behaviour of canProbeVersion is to accept the version specified by major and minor, and any later version, and all beta versions. You get the default behaviour by setting flags to 0. Use any combination of the canVERSION_xxx flags to modify the behaviour. Note: Different handles might have different driver versions installed.This should not normally be the case but it might happen anyway.You should check the version for each handle you open, e.g.directly after calling canOpenChannel(). A handle to an open circuit. The major version number of the version to test for. The minor version number of the version to test for. Reserved, must be zero. Any combination of the canVERSION_xxx flags, or 0. TRUE if the specified version of CANlib is installed on the system. Helper method to avoid code duplication in CanReadXXX methods. Reads a message from the receive buffer. If no message is available, the function returns immediately with return code . If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using . A handle to an open circuit. A reference to a buffer which receives the CAN identifier. This buffer will only get the identifier. To determine whether this identifier was standard (11-bit) or extended (29-bit), and/or whether it was remote or not, or if it was an error frame, examine the contents of the flag argument. A reference to the buffer which receives the message data. The output will be 8 or 64 byte depending on the type of message that was received (normal or CAN FD). A reference to a buffer which will receive the message length. A reference to a buffer which receives the message flags, which is a combination of the canMSG_xxx (including canFDMSG_xxx if the CAN FD protocol is enabled) and canMSGERR_xxx values. A reference to a buffer which receives the message time stamp. if a message was read. if there was no message available, canERR_xxx if failure Reads the error counters of the CAN controller. returns the latest known values of the error counters in the specified circuit.If the error counters change values precisely when is called, it may not be reflected in the returned result. Use to clear the counters. Note: Not all CAN controllers provide access to the error counters; in this case, an educated guess is returned. A handle to an open circuit. A reference to an int which receives the transmit error counter. A reference to an int which receives the receive error counter. A reference to an int which receives the which receives the number of overrun errors. if success else canStatus.canERR_XXX. Reads a message with a specified identifier from the receive buffer. Any preceding message not matching the specified identifier will be kept in the receive buffer. If no message with the specified identifier is available, the function returns immediately with an error code. If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using . A handle to an open circuit. The desired CAN identifier. A reference to the buffer which receives the message data. The output will be 8 or 64 byte depending on the type of message that was received (normal or CAN FD). A reference to a buffer which will receive the message length. A reference to a buffer which receives the message flags, which is a combination of the canMSG_xxx (including canFDMSG_xxx if the CAN FD protocol is enabled) and canMSGERR_xxx values. A reference to a buffer which receives the message time stamp. if a message was read. if there was no message available, canERR_xxx if failure Reads a message with a specified identifier from the receive buffer. Any preceding message not matching the specified identifier will be removed in the receive buffer. If no message with the specified identifier is available, the function returns immediately with an error code. If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using . A handle to an open circuit. The desired CAN identifier. A reference to the buffer which receives the message data. The output will be 8 or 64 byte depending on the type of message that was received (normal or CAN FD). A reference to a buffer which will receive the message length. A reference to a buffer which receives the message flags, which is a combination of the canMSG_xxx (including canFDMSG_xxx if the CAN FD protocol is enabled) and canMSGERR_xxx values. A reference to a buffer which receives the message time stamp. if a message was read. if there was no message available, canERR_xxx if failure Returns the status for the specified circuit. flags receives a combination of the canSTAT_xxx flags. A handle to an open circuit. a long which receives the status flags; this is a combination of any of the canSTAT_xxx. if success else canStatus.canERR_XXX. Waits until the receive buffer contains at least one message or a timeout occurs. If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own.If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B.This behaviour can be changed using . A handle to an open circuit. The timeout in milliseconds. 0xFFFFFFFF gives an infinite timeout. (zero) if the queue contains the desired message. (negative) if a timeout occurs before a message arrived. canERR_xxx (negative) if the call fails. Waits until the receive queue contains a message with the specified id, or a timeout occurs. If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using . A handle to an open circuit. The desired message identifier. The timeout in milliseconds. 0xFFFFFFFF gives an infinite timeout. (zero) if the queue contains the desired message. (negative) if a timeout occurs before a message arrived. canERR_xxx (negative) if the call fails. The canRequestBusStatistics function requests bus statistics from the hardware. The bus statistics figures can be retrieved later by a call to the canGetBusStatistics function.   Note: The time between a call to and the point in time where the bus statistics is actually available via a call to is not defined. Typically, you would call from your application periodically (for example, once per second) to request the data from the driver and then call with the same rate to obtain the latest reported data. An open handle to a CAN channel. if success else canStatus.canERR_XXX. The function requests that the hardware report the chip status (bus on/error passive status etc.) to the driver. The chip status can later be retrieved using the function.   Note: The function is asynchronous, that is, it completes before the answer is returned from the hardware. The time between a call to and the point in time where the chip status is actually available via a call to is not defined. always returns the latest data reported by the hardware. An open handle to a CAN channel. if success else canStatus.canERR_XXX. This function tries to reset a CAN bus controller by taking the channel off bus and then on bus again (if it was on bus before the call to ). This function will affect the hardware (and cause a real reset of the CAN chip) only if handle is the only handle open on the channel. If there are other open handles, this operation will not affect the hardware. if success else canStatus.canERR_XXX. Reads a message from the receive buffer. If no message is available, the function waits until a message arrives or a timeout occurs. If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using . A handle to an open circuit. A reference to a buffer which receives the CAN identifier. This buffer will only get the identifier. To determine whether this identifier was standard (11-bit) or extended (29-bit), and/or whether it was remote or not, or if it was an error frame, examine the contents of the flag argument. A reference to the buffer which receives the message data. The output will be 8 or 64 byte depending on the type of message that was received (normal or CAN FD). A reference to a buffer which will receive the message length. A reference to a buffer which receives the message flags, which is a combination of the canMSG_xxx (including canFDMSG_xxx if the CAN FD protocol is enabled) and canMSGERR_xxx values. A reference to a buffer which receives the message time stamp. If no message is immediately available, this parameter gives the number of milliseconds to wait for a message before returning. 0xFFFFFFFF gives an infinite timeout. if success, if there was no message available. else canStatus.canERR_XXX if failure. This routine sets the message acceptance filters on a CAN channel. Format of code and mask: A binary 1 in a mask means "the corresponding bit in the code isrelevant" A binary 0 in a mask means "the corresponding bit in the code is notrelevant" A relevant binary 1 in a code means "the corresponding bit in theidentifier must be 1" A relevant binary 1 in a code means "the corresponding bit in theidentifier must be 1" In other words, the message is accepted if ((code XOR id) AND mask) == 0. is_extended should be set to: 0: if the code and mask shall apply to 11-bit CAN identifiers. 1: if the code and mask shall apply to 29-bit CAN identifiers. If you want to remove a filter, call canSetAcceptanceFilter() with the mask set to 0. On some boards the acceptance filtering is done by the CAN hardware; on other boards(typically those with an embedded CPU,) the acceptance filtering is done by software. behaves in the same way for all boards, however. and both serve the same purpose but the former can set the code and mask in just one call. Note: You can set the extended code and mask only on CAN boards that support extended identifiers.Not all CAN boards support different masks for standard and extended CAN identifiers. Not implemented in linux. An open handle to a CAN circuit. The acceptance code to set. The acceptance mask to set. Select 29-bit CAN identifiers. if success else canStatus.canERR_XXX. The function sets the nominal bit rate of the specified CAN channel. The sampling point is recalculated and kept as close as possible to the value before the call. An open handle to a CAN channel. The new bit rate, in bits/second. if success else canStatus.canERR_XXX. This function sets the driver type for a CAN controller. This corresponds loosely to the bus output control register in the CAN controller, hence the name of this function. CANlib does not allow for direct manipulation of the bus output control register; instead, symbolic constants are used to select the desired driver type. An open handle to a CAN channel. Can driver type, canDRIVER_xxx). if success else canStatus.canERR_XXX. This function sets the nominal bus timing parameters for the specified CAN controller. The library provides default values for tseg1, tseg2, sjw and noSamp when freq is specified to one of the pre-defined constants, canBITRATE_xxx for classic CAN and canFD_BITRATE_xxx for CAN FD. If freq is any other value, no default values are supplied by the library. If you are using multiple handles to the same physical channel, for example if you are writing a threaded application, you must call once for each handle.The same applies to - the physical channel will not go off bus until the last handle to the channel goes off bus. Note: The value of sjw should normally be less than tseg1 and tseg2. Use to set the bus timing parameters in the ubiquitous 82c200 bit-timing register format. An open handle to a CAN channel. Bit rate (measured in bits per second); or one of the predefined constants(canBITRATE_xxx for classic CAN and canFD_BITRATE_xxx for CAN FD). Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. The Synchronization Jump Width. The number of sampling points; can be 1 or 3. if success else canStatus.canERR_XXX. This function sets the bus timing parameters using the same convention as the 82c200 CAN controller (which is the same as many other CAN controllers, for example, the 82527.) To calculate the bit timing parameters, you can use the bit timing calculator that is included with CANlib SDK. Look in the BIN directory. 82c200 Bit Timing btr0 [b7..b6]: SJW - 1 btr0 [b5..b0]: Prescaler -1 btr1 [b7]: 1: 3 samples, 0: 1 samples btr1 [b6..b4]: tseg2 - 1 btr1 [b3..b0]: tseg1 - 2 Note: CANlib will always behave as if the clock frequency is 16 MHz. It does not matter if the device has a different physical clock, since this will be compensated for by the driver. A handle to an open CAN circuit. The desired bit timing, formatted as the contents of the BTR0 register in the 82c200. The desired bit timing, formatted as the contents of the BTR1 register in the 82c200. if success else canStatus.canERR_XXX. This function sets the data phase bus timing parameters for the specified CAN controller. The library provides default values for tseg1, tseg2 and sjw when freq is specified to one of the pre-defined constants, canFD_BITRATE_xxx. An open handle to a CAN channel. CAN FD data bit rate (measured in bits per second); or one of the predefined constants canFD_BITRATE_xxx. Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. The Synchronization Jump Width. if success else canStatus.canERR_XXX. Set bus parameters for the specified CAN controller (classic CAN). If the channel is opened(see ) with flags or , use instead. Constraints that must be fulfilled: nominal.tq = 1 + nominal.prop + nominal.phase1 + nominal.phase2 nominal.tq ≥ 3 nominal.sjw ≤ min(nominal.phase1, nominal.phase2) 1 ≤ nominal.prescaler ≤ 2 To get device specific limits of bus parameters, see . An open handle to a CAN channel. Structure holding all Nominal values. if success else canStatus.canERR_XXX. Get bus parameters for the specified CAN controller. If the channel is opened (see ) with flags or , use instead. An open handle to a CAN channel. Structure holding bus parameters. if success else canStatus.canERR_XXX. Set bus parameters for the specified CAN controller. Use if the channel is opened(see ) with flags or , use otherwise. Constraints that must be fulfilled: nominal.tq = 1 + nominal.prop + nominal.phase1 + nominal.phase2 nominal.tq ≥ 3 nominal.sjw ≤ min(nominal.phase1, nominal.phase2) 1 ≤ nominal.prescaler ≤ 2 data.sjw ≤ min(data.phase1, data.phase2) data.tq = 1 + data.phase1 + data.phase2 data.tq ≥ 3 data.prescaler = nominal.prescaler data.prop = 0 To get device specific limits of bus parameters, see . An open handle to a CAN channel. Structure holding bus parameters for arbitration phase. Structure holding bus parameters for data phase. if success else canStatus.canERR_XXX. Get bus parameters for the specified CAN controller. Use if the channel is opened(see ) with flags or , use otherwise. An open handle to a CAN channel. Structure holding all Nominal values. Structure holding all Data values. if success else canStatus.canERR_XXX. This function sets the current CAN bus driver mode. This is typically a mode like sleep, wakeup, standby, fast mode, etc. The different modes are almost always hardware dependent and requires special DRVcan cables. As an example, the DRVcan S implements J2411 compliant single-wire CAN and supports four line modes, namely Normal, Sleep, Fast and Wakeup. Standard ISO 11898 CAN do not support any of these bus driver modes. Note: The bus driver mode is typically used to control things like one- or two-wire mode, sleep mode, and so on. It requires special support in the CAN driver circuit. An open handle to a CAN circuit. An int which defines the line mode, canTRANSCEIVER_LINEMODE_xxx. An int which defines the resnet mode. Set this parameter to unless you have good reasons to set it to something else. if success else canStatus.canERR_XXX. This function associates a window handle with the CAN circuit. A WM__CANLIB message is sent to that window when certain events (specified by the canNOTIFY_xxx flags) occur. When an event take place, a WM__CANLIB message will be sent to the window whose handle is aHWnd. This WM__CANLIB message will have: * WPARAM handle to the circuit where the event occurred * HIWORD(LPARAM) 0 * LOWORD(LPARAM) canEVENT_xxx In the routine that handles WM__CANLIB, you can call the CANlib API functions (for example, ) using the handle found in wParam. In the routine that handles WM__CANLIB, you must call repeatedly until it returns canERR_NOMSG, regardless of the LPARAM value. This will flush the driver's internal event queues. If you fail to do this, no more events will be reported. A handle to an open CAN circuit. Handle of the window which will receive the notification messages. The events specified with canNOTIFY_xxx, for which callback should be called. if success else canStatus.canERR_XXX. This function translates the canBITRATE_xxx constants to their corresponding bus parameter values. At return, this freq contains the actual bit rate (in bits per second). TSeg1 is the number of quanta (less one) in a bit before the sampling point. TSeg2 is the number of quanta after the sampling point. An int which contains the canBITRATE_xxx constant to translate. Frequency value. Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. Synchronization Jump Width. Number of sampling points. if success else canStatus.canERR_XXX. This function initializes a kvBusParamsTq object from a canBITRATE_xxx constant. A handle to an open CAN circuit. An int which contains the canBITRATE_xxx constant to translate. kvBusParamsTq object that will be initialized. if success else canStatus.canERR_XXX. This function initializes a kvBusParamsTq object from canFD_BITRATE_xxx constants. A handle to an open CAN circuit. An int which contains the canFD_BITRATE_xxx arbitration bitrate constant to translate. An int which contains the canFD_BITRATE_xxx data bitrate constant to translate. kvBusParamsTq object that will be initialized for the arbitration bitrate. kvBusParamsTq object that will be initialized for the data bitrate. if success else canStatus.canERR_XXX. 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. A handle to an open CAN circuit. The number of milliseconds to wait before the call returns, if no event occurs. 0xFFFFFFFF gives an infinite timeout. (zero) if success. (negative) if nothing happened during the specified time period. canERR_xxx (negative) if failure This function sends a CAN message. The call returns immediately after queuing the message to the driver. If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using .   Note The message has been queued for transmission when this calls return. It has not necessarily been sent. A handle to an open CAN circuit. The identifier of the CAN message to send. A reference to the message data. The length of the message in bytes. For Classic CAN dlc can be at most 8, unless is used. For CAN FD dlc can be one of the following 0-8, 12, 16, 20, 24, 32, 48, 64. A combination of message flags, canMSG_xxx (including canFDMSG_xxx if the CAN FD protocol is enabled). Use this parameter to send extended (29-bit) frames and/or remote frames. Use and/or for this purpose. if success else canStatus.canERR_XXX. Waits until all CAN messages for the specified handle are sent, or the timeout period expires. A handle to an open CAN circuit. The timeout in milliseconds. 0xFFFFFFFF gives an infinite timeout. (zero) if the queue emptied before the timeout period came to its end. (negative) not all messages were transmitted when the timeout occurred. (negative) This could be caused by an erroneous parameter, or if you have turned TXACKs off (by using ) because if you do you can't use this call. The driver simply doesn't know when all the messages are sent! canERR_xxx (negative) if failure This function sends a CAN message. It returns when the message is sent, or the timeout expires. This is a convenience function that combines and . If you are using the same channel via multiple handles, note that the default behaviour is that the different handles will "hear" each other just as if each handle referred to a channel of its own. If you open, say, channel 0 from thread A and thread B and then send a message from thread A, it will be "received" by thread B. This behaviour can be changed using . A handle to an open CAN circuit. The identifier of the CAN message to send. A reference to the message data. The length of the message in bytes. For Classic CAN dlc can be at most 8, unless is used. For CAN FD dlc can be one of the following 0-8, 12, 16, 20, 24, 32, 48, 64. A combination of message flags, canMSG_xxx (including canFDMSG_xxx if the CAN FD protocol is enabled). Use this parameter to send extended (29-bit) frames and/or remote frames. Use canMSG_EXT and/or canMSG_RTR for this purpose. The timeout, in milliseconds. 0xFFFFFFFF gives an infinite timeout. if success else canStatus.canERR_XXX. Use this function if you are loading canlib32.dll dynamically (that is, using the Win32 API LoadLibrary) and need to unload it using the Win32 API FreeLibrary. will free allocated memory, unload the DLLs canlib32.dll has loaded and de-initialize data structures. You must call again to use the API functions in canlib32.dll. if success else canStatus.canERR_XXX. Create a byte[] containing the utf-8 representation of string stringValue and a terminating'\0' character. Convert byte[] contents to a string object using the utf-8 decoder. Evaluate status code value as an int. status as int value. 1 if x is equal to int value of canStatus.canOK else 0. Evaluate status code value as an int. status as int value. 0 if x is equal to int value of canStatus.canOK else 1. The function is used by certain OEM applications. An open handle to a CAN channel. Data to send to driver. if success else canStatus.canERR_XXX. The function is used by certain OEM applications. An open handle to a CAN channel. Type of announcement. Data to send to driver. if success else canStatus.canERR_XXX. Emit a sound of a specific frequency and duration from the loudspeaker on the device.   Note: This function requires that a loudspeaker be present on the hardware. An open handle to a CAN channel. The frequency (in Hertz) of the sound. The duration of the sound, in milliseconds. if success else canStatus.canERR_XXX. The reads the current device's specific mode. An open handle to a CAN channel. A pointer to a 32-bit integer that will receive the kvDEVICE_MODE_xxx value. if success else canStatus.canERR_XXX. The sets the mode. An open handle to a CAN channel. One of the kvDEVICE_MODE_xxx constants, defining which mode to use. if success else canStatus.canERR_XXX. Copy an arbitrary file from the device to the host. An open handle to a CAN channel. The device file name. The target host file name. if success else canStatus.canERR_XXX. Copy an arbitrary file from the host to the device. An open handle to a CAN channel. The host file name. The target device file name. if success else canStatus.canERR_XXX. This function deletes a file on the device An open handle to a CAN channel. The file on the device to delete. if success else canStatus.canERR_XXX. Get the number of files. An open handle to a CAN channel. The number of files on the device. if success else canStatus.canERR_XXX. Returns the name of the file with number fileNo. An open handle to a CAN channel. The number of the file. Name of the file as a string if success else canStatus.canERR_XXX. Read disk parameters   Note: Not yet implemented An open handle to a CAN channel. The item we want information on. A pointer to a 32-bit integer that will receive the result. if success else canStatus.canERR_XXX. Turn the LEDs on the device on or off. An open handle to a CAN channel. One of the kvLED_ACTION_xxx constants, defining which LED to turn on or off. Specifies the time, in milliseconds, during which the action is to be carried out. When the timeout expires the LED(s) will return to its ordinary function. if success else canStatus.canERR_XXX. Note: The kvGetApplicationMapping function is presently not implemented. if success else canStatus.canERR_XXX. The function returns information about the different supported hardware types in the installed version of CANlib. This function is used to enumerate all the supported hardware types in the installed version of CANlib. It does not return a complete list of all supported devices, nor does it return a list of the presently installed hardware. The returned data indicates which device families are supported.   For example, a returned set of data might be:  •hwType =   •hwBusType =   •hwName = "Kvaser Memorator Professional"  This means that  •the presently installed version of CANlib supports members in the Kvaser Memorator Pro family(e.g.the HS/HS and the HS/LS),  •the members of the Kvaser Memorator Pro family are USB devices,  •the members of the Kvaser Memorator Pro family use the hardware type. The kvGetSupportedInterfaceInfo() function is intended to help application designers build a bus-oriented display of the different installed and/or supported Kvaser devices in the computer.   Note: Not inplemented in linux. Use this parameter to enumerate the different supported hardware types. Start with index = 0, and then call again() with index = 1,2,3,... until the function returns an error code. Name of the hardware family. Hardware type as a canHWTYPE_xxx. Bus type as a kvBUSTYPE_xxx. if success else canStatus.canERR_XXX. This function is used to confirm configuration. It is required to call this function, before it is possible to use any kvIoPinSetXxx()/kvIoPinGetXxx() function. After a configuration change, module removal or insertion, it is required to confirm the new configuration. ///   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. if success else canStatus.canERR_XXX. This function is used to retrieve the voltage level of the specified analog I/O pin.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . A reference to a float which receives the voltage of the pin. if success else canStatus.canERR_XXX. This function is used to retrieve the value of the specified digital input I/O pin. If the pin is LOW, the integer pointed to by value is assigned zero. If the pin is HIGH, the integer pointed to by value is assigned a '1'.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . A reference to an unsigned int which receives the value of the pin. if success else canStatus.canERR_XXX. This function is used to retrieve I/O pin properties.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, Type of item to retrieve, . Object to store the data in. if success else canStatus.canERR_XXX. This function is used to get the latest set voltage level of an analog I/O pin. This function only returns values as they are presented in memory and the actual value on the output pin may therefore differ.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . A reference to a float which receives the latest set voltage level of the pin. if success else canStatus.canERR_XXX. This function is used to get the latest set value of a digital output I/O pin. If the latest value written to the pin is LOW, the integer pointed to by value is assigned zero. If it is HIGH, the integer pointed to by value is assigned a '1'. This function only returns values as they are presented in memory and the actual value on the output pin may therefore differ.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . A reference to an unsigned int which receives the value of the pin. if success else canStatus.canERR_XXX. This function is used to get the latest set value of a relay I/O pin. If value is zero, the relay has been set to OFF. For any non-zero value, the relay has been set to ON. This function returns values as they are presented in memory and the actual state on the relay pin may differ.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . A reference to an unsigned int which receives the value of the pin. if success else canStatus.canERR_XXX. Get the number of I/O pins available from a device.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. A reference to an int which receives the number of pins. if success else canStatus.canERR_XXX. This function is used to set the voltage level of the specified analog I/O pin.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . A float which sets a voltage of the pin. if success else canStatus.canERR_XXX. This function is used to set a digital output I/O pin. If value is zero, the pin is set LOW. For any non-zero value, the pin is set HIGH.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . An int32 which sets a value of the pin. if success else canStatus.canERR_XXX. This function is used to set I/O pin properties, for items that can be changed.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . Type of item to set, . The data to set. if success else canStatus.canERR_XXX. This function is used to control a relay of the specified I/O pin. If value is zero, the relay is set to OFF. For any non-zero value, the relay is set to ON.   Note: Preliminary API that may change. Not implemented in Linux. An open handle to a CAN channel. The pin number, . An int which sets a value of the pin. if success else canStatus.canERR_XXX. This retrieves the latest ping time issued by an earlier call to . A handle to an open circuit. Time of request in microseconds. Used for matching answer to request. Latest value of ping time in milliseconds. if success else canStatus.canERR_XXX. This function sends an active ping to a device. The ping time can later be retrieved using . A handle to an open circuit. Time of request in microseconds. Used for matching answer to request. if success else canStatus.canERR_XXX. This function is used to set all output and relay pins of a module in a single call. See also   Note: Preliminary API that may change. Not implemented in linux. Values for pins of type input are ignored. An open handle to a CAN channel. The module number, see . An object that contains the module type and pin values to set. The object must correspond to the module type, and can be any one of the following. if success else canStatus.canERR_XXX. This function is used to read all the pins of one module in a single call. See also   Note: Preliminary API that may change. Not implemented in linux. An open handle to a CAN channel. The module number, see . An object that receives the type and pin values of the module. The object must correspond to the module type, and can be any of the following. if success else canStatus.canERR_XXX. Reading customer data works with Kvaser Leaf (of all types), Kvaser USBcan Professional, Kvaser Memorator Professional, Kvaser Eagle and Kvaser Memorator Light.To write customer data use external tools. An open handle to a CAN channel Assigned by Kvaser. Must be zero (reserved) A pointer to a buffer of up to 8 bytes where the result will be placed. The size of the buffer that data points at. if success else canStatus.canERR_XXX. The kvReadTimer reads the hardware clock on the specified device and returns the value. When the call to returns, the time value is already obsolete.The time required for the device firmware, any intermediary buses (like USB,) and the operating system to return the time value is not defined. An open handle to a CAN channel Returned timer value if success else canStatus.canERR_XXX. The kvReadTimer64 reads the hardware clock on the specified device and returns the value. When the call to returns, the time value is already obsolete.The time required for the device firmware, any intermediary buses (like USB,) and the operating system to return the time value is not defined. An open handle to a CAN channel Returned timer value if success else canStatus.canERR_XXX. Loads a compiled script file (.txe) stored on the host(PC) into a script slot on the device.   The canHandle is used to determine what channel is set as the default channel for the loaded script. If your canHandle was opened via a device's second channel, the default channel number will be set to 1 (the numbering of channel on the card starts from 0). An open handle to a CAN channel. The slot where to load the script. Path to the script file on PC. KvStatus.OK if success else KvStatus.ERR_XXX. Loads a compiled script file (.txe) stored on the device (SD card) into a script slot on the device.   Note. Not implemented in linux. An open handle to a CAN channel. The slot where to load the script. Path to the script file on PC. KvStatus.OK if success else KvStatus.ERR_XXX. Send an event of a type, and an event number and associated data to a script running in a specific slot.   Note. Not implemented in linux. An open handle to a CAN channel. The slot where to load the script. The event to send, of type kvEVENT_xxx. The event's number. The event's data. KvStatus.OK if success else KvStatus.ERR_XXX. This routine starts a loaded script. An open handle to a CAN channel. The slot with the loaded script we want to start. KvStatus.OK if success else canStatus.canERR_XXX. Read the current status of a script slot.   Note. Not implemented in linux. An open handle to a CAN channel. The slot where to load the script. The script status, as kvSCRIPT_STATUS_xxx flag bits. KvStatus.OK if success else KvStatus.ERR_XXX. This routine stops a started script. An open handle to a CAN channel. The slot with the loaded script we want to start. Stop mode of type kvSCRIPT_STOP_xx. KvStatus.OK if success else canStatus.canERR_XXX. This function can be used to retrieve information from a compiled script file (.txe). Path to the script file on PC. Item to obtain. Valid values are one of the constants canTXEDATA_xxx.. Return value as object. KvStatus.OK if success else KvStatus.ERR_XXX. Unloads a stopped script. An open handle to a CAN channel. The slot where to load the script. KvStatus.OK if success else KvStatus.ERR_XXX. Close an open envvar.   Note. Not implemented in linux. An open handle to an envvar. KvStatus.OK if success else KvStatus.ERR_XXX. Opens an existing envvar and returns a handle to it.   Note. Not implemented in linux. An open handle to a CAN channel. The envvar's name; a pointer to a \c NULL terminated array of chars. A pointer to a 32-bit integer that will receive the kvENVVAR_TYPE_xxx type. A pointer to a 32-bit integer that will receive the size of the envvar in bytes. A KvHandle handle (positive) to an envvar if success, canERR_xxx (negative) if failure Get a range of data bytes from an envvar.   Note. Not implemented in linux. An open handle to an envvar. A pointer to a data area where the retrieved data range should be stored. The start index of the data range. The length in bytes of the data range. KvStatus.OK if success else KvStatus.ERR_XXX. Get the value of a float envvar.   Note. Not implemented in linux. An open handle to an envvar. The current value. KvStatus.OK if success else KvStatus.ERR_XXX. Get the value of an int envvar.   Note. Not implemented in linux. An open handle to an envvar. The current value. KvStatus.OK if success else KvStatus.ERR_XXX. Reads a printf from a subscribed script slot. Set up a subscription with . An open handle to a CAN channel. The slot where the printf originated. The printf timestamp. Printf flags. A combination of canSTAT_xxx flags. The printf string. KvStatus.OK if success else KvStatus.ERR_XXX. Set a range of data bytes in an envvar.   Note. Not implemented in linux. An open handle to an envvar. A pointer to a data area where the retrieved data range should be stored. The start index of the data range. The length in bytes of the data range. KvStatus.OK if success else KvStatus.ERR_XXX. Sets the value of a float envvar.   Note. Not implemented in linux. An open handle to an envvar. The new value. KvStatus.OK if success else KvStatus.ERR_XXX. Sets the value of an int envvar.   Note. Not implemented in linux. An open handle to an envvar. The new value. KvStatus.OK if success else KvStatus.ERR_XXX. Sets up a printf subscription to a selected script slot. Read the printf messages with . An open handle to a CAN channel. The slot to subscribe to. Subscription request i.e. kvSCRIPT_REQUEST_TEXT_xxx. KvStatus.OK if success else KvStatus.ERR_XXX. Get the maximum size of an envvar.   An open handle to a CAN channel. The maximum size of an envvar. KvStatus.OK if success else KvStatus.ERR_XXX. Runs a built-in self test in the device. Note that not all devices supports built-in self tests. An open handle to a CAN channel. Self test result KvStatus.OK if success else KvStatus.ERR_XXX. The function registers a callback function which is called when certain events occur. You can register at most one callback function per handle at any time. To remove the callback, call with a NULL pointer in the callback argument.   Note. The callback function is called in the context of a high-priority thread created by CANlib. You should take precaution not to do any time consuming tasks in the callback. You must also arrange the synchronization between the callback and your other threads yourself. An open handle to a CAN channel. A pointer to a callback function of type A pointer to arbitrary user-defined context data which is passed to the callback function. One or more of the canNOTIFY_xxx flags. KvStatus.OK if success else KvStatus.ERR_XXX. This routine adds an open channel handle to a domain.   Note. A time domain is a set of channels with a common time base. A TimeDomain returned from A Handle to an open channel KvStatus.OK if success else KvStatus.ERR_XXX. This routine creates an empty time domain. The variable is set by this function and then used in later calls to other functions using a . Time domains created by can be destroyed with a call to .   Note. A time domain is a set of channels with a common time base. An empty TimeDomain object KvStatus.OK if success else KvStatus.ERR_XXX. This is a cleanup routine that deletes all members of a domain and then deletes the domain itself.   Note. A time domain is a set of channels with a common time base. A TimeDomain returned from KvStatus.OK if success else KvStatus.ERR_XXX. This routine collects some data on a time domain. A time domain is a set of channels with a common time base. A TimeDomain returned from A structure that is filled by the function KvStatus.OK if success else KvStatus.ERR_XXX. This routine removes an open channel handle from a domain.   Note. A time domain is a set of channels with a common time base. A TimeDomain returned from A Handle to an open channel KvStatus.OK if success else KvStatus.ERR_XXX. This routine resets the time on all members of a time domain. After a call to this routine timestamps from all channels with MagiSync™ running have no offset at all any longer. The same applies for channels that reside on the same physical interface.   Note. A time domain is a set of channels with a common time base. A TimeDomain returned from KvStatus.OK if success else KvStatus.ERR_XXX. Callback for Notifications, used in The callback function is called with the following arguments:  •handle - the handle of the CAN channel where the event happened.  •context - the context pointer you passed to .  •notifyEvent - one of the canNOTIFY_xxx notification codes.  Generally, a return code greater than or equal to zero means success. A value less than zero means failure. Normal successful completion; The driver is just fine, and really believes it carried out your command to everyone's satisfaction. Error in one or more parameters; a parameter specified in the call was invalid, out of range, or so. This status code will also be returned when the call is not implemented. There were no messages to read; A function tried to read a message, but there was no message to read. Specified device or channel not found. There is no hardware available that matches the given search criteria. For example, you may have specified canOPEN_REQUIRE_EXTENDED but there's no controller capable of extended CAN. You may have specified a channel number that is out of the range for the hardware in question. You may have requested exclusive access to a channel, but the channel is already occupied. Out of memory; A memory allocation failed. No channels available; There is indeed hardware matching the criteria you specified, but there are no channels available, or the channel you specified is already occupied. Interrupted by signals. Timeout occurred; A function waited for something to happen (for example, the arrival of a message), but that something didn't happen. The library is not initialized; The driver is not initialized. canInitializeLibrary() was probably not called? Out of handles; No handles are available inside canlib32. The application has too many handles open (i.e. has called canOpenChannel() too many times, or there's a memory leak somewhere.)  Note. We are not talking about Windows handles here, it's CANLIB's own internal handles. Handle is invalid; The CANLIB handle you specified (if the API call includes a handle) is not valid. Ensure you are passing the handle and not, for example, a channel number. Error in the ini-file (16-bit only) Driver type not supported; CAN driver mode is not supported by the present hardware. Transmit buffer overflow; The transmit queue was full, so the message was dropped. Reserved. A hardware error has occurred; Something probably related to the hardware happened. This could mean that the device does not respond (IRQ or address conflict?), or that the response was invalid or unexpected (faulty card?). A driver DLL can't be found or loaded; (One of) the DLL(s) specified in the registry failed to load. This could be a driver installation problem. A DLL seems to have wrong version; DLL version mismatch. (One of) the DLL(s) specified in the registry is - probably - too old, or - less likely - too new. Error when initializing a DLL; Something failed when a device driver was being initialized. In other words, we can open the driver but it makes a lot of fuss about something we don't understand. Operation not supported by hardware or firmware. Reserved. Reserved. Reserved. Can't find or load kernel driver; A device driver (kernel mode driver for NT, VxD for W95/98) failed to load; or the DLL could not open the device. Privileges? Driver file missing? DeviceIOControl failed; Use Win32 GetLastError() to learn what really happened. Can't find req'd config s/w (e.g. CS/SS) The card was removed or not inserted. Reserved. Error (missing data) in the Registry; A registry key is missing, invalid, malformed, has gone for lunch or what not. can_verify.exe might provide some insight. The license is not valid. Internal error in the driver; Indicates an error condition in the driver or DLL, which couldn't be properly handled. Please contact the friendly support at support@kvaser.com. Access denied; This means that you tried to set the bit rate on a handle to which you haven't got init access or you tried to open a channel that already is open with init access. See canOpenChannel() for more information about init access. Not implemented; The requested feature or function is not implemented in the device you are trying to use it on. Device File error; An error has occured when trying to access a file on the device. Host File error; An error has occured when trying to access a file on the host. Disk error; A disk error has occurred. Verify that the disk is initialized. CRC error; The CRC calculation did not match the expected result. Configuration Error; The configuration is corrupt. Memo Error; Other configuration error. Script Fail; A script has failed. Note. This code represents several different failures, for example:  •Trying to load a corrupt file or not a .txe file  •Trying to start a t script that has not been loaded  •Trying to load a t script compiled with the wrong version of the t compiler  •Trying to unload a t script that has not been stopped  •Trying to use an envvar that does not exist The t script version dosen't match the version(s) that the device firmware supports.; The compiled t script container file format is of a version which is not supported by this version of canlib.; An error occured while trying to parse the compiled t script file.; The buffer provided was not large enough to contain the requested data.; The I/O pin doesn't exist or the I/O pin type doesn't match the called function, e.g. trying to use input pins as outputs or use digital pins as analog pins. The I/O pin configuration is not confirmed. Use kvIoConfirmConfig() to confirm the configuration. The I/O pin configuration has changed after last call to kvIoConfirmConfig. Use kvIoConfirmConfig() to confirm the new configuration. The previous I/O pin value has not yet changed the output and is still pending. This happens when e.g. kvIoPinSetAnalog() is called twice on the same pin within a short time. There is no valid I/O pin configuration. Reserved. These defines are used to choose item in . An unsigned 32-bit integer, . Read-only. An unsigned 32-bit integer, . Read-only. An unsigned 32-bit integer, . Read-only. An unsigned 32-bit integer that contains the resolution in number of bits. Read-only. A float that contains the lower range limit in volts. Read-only. Note. This is not applicable for relay pins. A float that contains the upper range limit in volts. Read-only. Note. This is not applicable for relay pins. An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from LOW to HIGH. An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from HIGH to LOW. An unsigned 32-bit integer that contains the low-pass filter order for an analog input pin. 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. An unsigned 32-bit integer that contains the module number the pin belongs to. The number starts from 0. Read-only. An unsigned 32-bit integer that contains the serial number of the submodule the pin belongs to. Read-only. 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. One of these constants is returned when requesting using . Kvaser Add-on module with digital inputs and digital outputs. Kvaser Add-on module with analog inputs and analog outputs. Kvaser Add-on module with relays and digital inputs. Kvaser built-in module with one digital input and one digital output. These defines are result when requesting . Digital Analog Relay These defines are used to choose item . An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from LOW to HIGH. An unsigned 32-bit integer that contains the filter time in micro seconds when a digital input pin goes from HIGH to LOW. An unsigned 32-bit integer that contains the low-pass filter order for an analog input pin. 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. These defines are result when requesting . Input Output This struct is returned by canGetBusStatistics(). The values are cleared when the corresponding channel goes on bus. Number of received standard (11-bit identifiers) data frames. Number of received standard (11-bit identifiers) remote frames. Number of received extended (29-bit identifiers) data frames. Number of received extended (29-bit identifiers) remote frames. Number of error frames. Bus load The number of overruns detected by the hardware, firmware or driver. canUserIoPortData Used in and . Port number used in e.g. /. Port value used in e.g. /. Used for time domain handling. number of MagiSync groups. number of MagiSync members. number of non MagiSync interfaces. number of non MagiSync members. Version info Used in when requesting , , or Version1 Version2 Version3 Version4 Conversion operator returning Int32[] buffer HW Status. Used in when requesting HW Status1 HW Status2 HW Status3 HW Status4 HW Status5 HW Status6 Conversion operator returning Int32[] buffer Returned when using Returns clock characteristics for device The device clock frequency can then be calculated as: double frequency = numerator/denominator * 10 ** power_of_ten; The version of this struct, currently 1 The numerator part of the device clock frequency. The denominator part of the device clock frequency. The power_of_ten part of the device clock frequency. The accuracy (in ppm) of the device clock. Returned when using 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). This is only intended for internal use. The version of this struct, currently 2 Arbitration phase minimum parameters. Arbitration phase maximum parameters. Data phase minimum parameters. Data phase maximum parameters. Returned when using , This struct shows the low level limits of the parameters. Note that seg1 = prop + phase1 and seg2 = phase2 Total bit time, in number of time quanta. Phase segment 1, in number of time quanta Phase segment 2, in number of time quanta Sync jump width, in number of time quanta Propagation segment, in number of time quanta Prescaler constructor, setting all default values. Function, setting all structure values. Used in and Indicate a bitrate of 1 Mbit/s. Used in and Indicate a bitrate of 500 kbit/s. Used in and Indicate a bitrate of 250 kbit/s. Used in and Indicate a bitrate of 125 kbit/s. Used in and Indicate a bitrate of 100 kbit/s. Used in and Indicate a bitrate of 62 kbit/s. Used in and Indicate a bitrate of 50 kbit/s. Used in and Indicate a bitrate of 83 kbit/s. Used in and Indicate a bitrate of 10 kbit/s. Used in and when using the CAN FD protocol. Indicates a bitrate of 0.5 Mbit/s and sampling point at 80%. Used in and when using the CAN FD protocol. Indicates a bitrate of 1.0 Mbit/s and sampling point at 80%. Used in and when using the CAN FD protocol. Indicates a bitrate of 2.0 Mbit/s and sampling point at 80%. Used in and when using the CAN FD protocol. Indicates a bitrate of 2.0 Mbit/s and sampling point at 60%. d Used in and when using the CAN FD protocol. Indicates a bitrate of 4.0 Mbit/s and sampling point at 80%. Used in and when using the CAN FD protocol. Indicates a bitrate of 8.0 Mbit/s and sampling point at 60%. Used in and when using the CAN FD protocol. Indicates a bitrate of 8.0 Mbit/s and sampling point at 80%. 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. 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. Buffer points to a 32-bit unsigned integer that receives a combination of canCHANNEL_IS_xxx flags. 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 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. Buffer points to a 32-bit unsigned integer which receives the channel number on the card. 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. 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. 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. 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. Buffer points to a 64-bit (8 bytes) 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, so e.g. 73-30130-00122-0 is coded as 0x0007330130001220. Buffer points to a 64-bit (8 bytes) 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, so e.g. 73-30130-00122-0 is coded as 0x0007330130001220. Note. Not implemented in linux. Buffer points to an area which receives a zero-terminated string with a clear-text name of the channel. 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. and to build your own channel name. Buffer points to an array of 4 32-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.  •0: 0  •1: The build number  •2: The minor revision number  •3: The major revision number  Buffer points to an array of four 32-bit integers which receives the file version number 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  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. •1: kvalapw.dll - used with CANlib up to 2.29.  •2: kvalapw2.dll - used with CANlib from 3.0 and on.  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 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. 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. 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. Buffer points to an array of four 32-bit 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  Buffer points to an array of four 32-bit 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  Buffer points to a string with the device manufacturer's name. Note. Not implemented in linux. Buffer points to a string with the device manufacturer's name. Buffer points to a string with the product name of the device. Note. Not implemented in linux. Buffer points to a string with the product name of the device. Buffer points to a string with the name of the device driver (e.g. "kcanl"). 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.). Buffer point to a 32-bit unsigned integer that receives the roundtrip time which is measured in milliseconds. Buffer points to a 32-bit unsigned integer that receives the kvBUSTYPE_GROUP_xxx bus type. Buffer points to a string with the current device name. 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. Buffer points to a 32-bit unsigned integer that receives the current WLAN operational mode of the remote capable device; canCHANNEL_OPMODE_xxx. Buffer points to a string with the remote profile name of the device. Buffer points to a string with the remote host name of the device. Buffer points to a string with the mac address of the device. Buffer points to a 32-bit unsigned integer which receives maximum bitrate of the device. Zero value means no limit on bitrate. Buffer points to a 32-bit unsigned integer that receives the capabilities mask of the CAN channel. This mask specifies which capabilities the device is guaranteed to support/not support at the moment, see canCHANNEL_CAP_xxx for info about flags. 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. Buffer points to a 32-bit unsigned integer that returns the type of remote connection. See kvREMOTE_TYPExxx for returned values. Buffer points to a 32-bit unsigned integer that returns the logger type of the device. See kvLOGGER_TYPE_xxx for returned values. Buffer points to a with the hardware status codes for the device Note. This is only intended for internal use. Buffer is an unsigned int64 containing the unsigned int32 values, feature eanLo and feature eanHi of the device. Note. This is only intended for internal use. This define is used in , buffer mentioned below refers to this functions argument. buffer is This define is used in , buffer mentioned below refers to this functions argument. buffer is Buffer points to an array of two 64-bit unsigned integers that receives the capabilities value and capabilities mask of the CAN controller. The mask specifies which capabilities the corresponding device is guaranteed to support/not support at the moment. Contents depending on index:  •0: 0value •1: 0mask Value and mask is a combination of the canCHANNEL_CAP_EX_xxx flags. Buffer is a string with channel name. If no channel name is set, canERR_NOT_IMPLEMENTED will be returned, regardless of channel name is supported in the device or not. Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel is opened exclusively. Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel is active (either opened in LIN mode or on-bus in CAN mode.) Used with canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as CAN FD. Reserved for when needed. public const int canCHANNEL_IS_CANFD_NON_ISO = 0x0008; canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as LIN. canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as a LIN master. canCHANNELDATA_CHANNEL_FLAGS, indicates that the channel has been opened as a LIN slave. The driver is turned off. Not implemented in all types of hardware. 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. The "normal" driver type (push-pull). This is the default. Sets the code for standard (11-bit) identifiers. Sets the code for standard (11-bit) identifiers. Sets the code for standard (11-bit) identifiers. Sets the code for standard (11-bit) identifiers. Sets the code for standard (11-bit) identifiers. Sets the mask for standard (11-bit) identifiers. Sets the mask for extended (29-bit) identifiers. Unknown or undefined The virtual CAN bus LAPcan Family CANpari (obsolete). PCcan Family PCIcan Family USBcan (obsolete). PCIcan II family USBcan II, USBcan Rugged, Kvaser Memorator Simulated CAN bus for Kvaser Creator (obsolete). Kvaser Acquisitor (obsolete). Kvaser Leaf Family Kvaser PC104+ Kvaser PCIcanx II Kvaser Memorator Professional family Kvaser Memorator Professional family Kvaser USBcan Professional Obsolete name, use canHWTYPE_BLACKBIRD instead Kvaser BlackBird Kvaser Memorator Light Obsolete name, use canHWTYPE_EAGLE instead Kvaser Eagle family Obsolete name, use canHWTYPE_BLACKBIRD_V2 instead Kvaser BlackBird v2 Kvaser Mini PCI Express USBcan Pro HS/K-Line Kvaser Ethercan Kvaser USBcan Light Kvaser USBcan Pro 5xHS and variants Kvaser PCIEcan 4xHS and variants Kvaser Memorator Pro 5xHS and variants Kvaser Leaf Pro HS v2 and variants Kvaser Memorator (2nd generation) Kvaser Hybrid CAN/LIN Kvaser DIN Rail SE400S and variants Can use extended identifiers Can report busload etc Can return error counters Obsolete, only used by LAPcan driver Can send error frames Can send CAN overload frame Can report when a CAN messsage transmission is initiated Can report when a CAN messages has been transmitted Virtual CAN channel Simulated CAN channel Obsolete, use canCHANNEL_CAP_REMOTE_ACCESS or \ref canGetChannelData() instead. CAN-FD ISO compliant channel CAN-FD NON-ISO compliant channel Channel supports Silent mode Channel supports Single Shot messages Channel has logger capabilities. Channel has remote capabilities. Channel has script capabilities. Channel has LIN capabilities. Channel has IO API capabilities. Channel has diagnostic capabilities. Channel has Busparams TQ capabilities. WLAN Operational mode Not applicable, or unknown Infrastructure mode Reserved value, do not use Adhoc mode Driver (transceiver) capabilities Used with Notification codes; appears in the notification message. when the queue of received CAN messages goes from empty to non-empty when a CAN message has been transmitted when a CAN bus error is reported by the CAN controller when the CAN controller changes state An envvar changed. Bus on/off status changed. Device removed. Flags that can be combined in a call to . Don't allow sharing of this CANlib channel between applications. This flag causes two things to happen: The call will fail if the specified circuit doesn't allow extended CAN (CAN 2.0B). or If no frame-type flag is specified in a call to , it is assumed that extended CAN should be used. Allow opening of virtual channels as well as physical channels. Open the channel even if it is opened for exclusive access already. Warning! Use this flag with caution. 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. is returned although the call had no effect), unless you enable "access error reporting" by calling using . Access error reporting is by default off. Init access is the default. Don't open the handle with init access. 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. 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 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. The channel will use the CAN FD protocol, ISO compliant. 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. Used to mask the non-info bits. Message is a remote request. Message has a standard (11-bit) identifier. Message has an extended(29-bit) identifier. Message is a WAKEUP message(SWC hardware.) NERR was active during the message(TJA1054 hardware) Message represents an error frame. Message is a TX ACK(msg has really been sent) Message is a TX REQUEST(msg was transfered to the chip) Message is NOT sent on the bus. The transmission of messages are delayed. The dlc specifies the delay in milliseconds (1..1000). Message is a LOCAL TX ACK (msg was sent on another handle on the same channel) Message is Single Shot, try to send once, no retransmission. This flag can only be used with transmitted messages. Message is a failed Single Shot, message was not sent. This flag is only used with received messages. Only together with canMSG_TXNACK, Single shot message was not sent because arbitration was lost. This flag is only used with received messages. Used to mask the non-error bits HW buffer overrun SW buffer overrun Stuff error Form error CRC error Sent dom, read rec Sent rec, read dom Any overrun condition. \sa \ref section_user_guide_send_recv_overruns Any bit error. Any RX error Bit mask for canFDMSG_XXX bits Message is an FD message (CAN FD) Message is sent/received with bit rate switch (CAN FD) Sender of the message is in error passive mode (CAN FD) The circuit is error passive. The circuit is Off Bus. At least one error counter > 96. The circuit is error active. There are messages pending transmission. There are messages in the receive buffer. The circuit is error passive. There has been at least one TX error. There has been at least one RX error of some sort. There has been at least one HW buffer overflow. There has been at least one SW buffer overflow. For convenience. Prefer extended identifiers (Value is ignored). Prefer standard identifiers (Value is ignored). Clear the Can Error Counter (Value is ignored). Set Timer Scale (default value is 1000 us. Input value is a uint32 in us) . Enabling transmit Acknowledges on a channel (Input value is a uint32). Get the current RX buffer level (Return value is a uint32). Get the current TX buffer level (Return value is a uint32). Discard the current contents of the RX queue (Value is ignored). Discard the current contents of the TX queue (Value is ignored). Get the Current timer scale (Value is a uint32 in us). Turns transmit requests on or off.(Valid input values are 0 and 1 (uint32)) Buf points at a HANDLE which receives a Windows Event handle which can be passed to the Win32 API WaitForSingleObject. Not yet implemented. This is only intended for internal use. Buf points to a HANDLE which receives the Windows handle related to the CANlib handle. This is only intended for internal use. This is only intended for internal use. Buf points to a unsigned char which contains, 0 to turn access error reporting off, and 1 to turn access error reporting on. Returns an Int32 the current setting of the access error reporting (0 or 1.) Connects the handle to the virtual bus number (0..31) which the buf points to. Argument is of type unsigned int Disconnects the handle from the virtual bus number (0..31) which the buf points to. Argument is of type unsigned int Buf points to a canUserIoPortData struct that contains a port number and a port value to set. This is used by special hardware only. 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. This is only intended for internal use. Use this function code to set the size of the receive buffer for a specific handle. Value is a uint32 which contains the new size (number of messages) of the receive buffer. This is only intended for internal use. This is only intended for internal use. This function enables or disables automatic time reset on bus on. Argument is of type Int32 with value enable or disable (1 or 0). Returns the state of the Transmit Acknowledge as a uint32 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. This function turns error frame reporting on or off. Argument is of type Int32 with value on or off (1 or 0). Value is a uint32 that receives the quality of the channel, where the quality is measured in percent of optimal quality. Returns the round trip time to a device. value is a uint32 that contains the roundtrip time measured in milliseconds. Value is a uint32 that contains the kvBUSTYPE_GROUP_xxx bus type. Value is a string with the current device name. Not supported on Linux.> Value is a uint32 that contains the time in milliseconds since the last communication occurred. Value a uint32 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. Value is uint32 that contains a user defined bitrate. A value of 0 means that the device should use its own default bitrate limit. Set the responsitivity of some devices. Value is a uint32 that should contain a value between 0 and 100. Set the responsitivity of some devices. Value is a uint32 that should contain a value between 0 and 100. Reset overrun count and flags, buf argument is ignored Set the current LIN access mode returned in canCHANNELDATA_CHANNEL_FLAGS. Note. Only for internal Use Enable reception of canMSG_LOCAL_TXACK. Value is uint32 and can be either 0 or 1. A value of 0 means that the local txack is disabled, a value of 1 means that it is enabled. Used in as notification flags. Turn notifications off. . Used in as notification flags. CAN message reception notification. Used in as notification flags. CAN message transmission notification. Used in as notification flags. CAN bus error notification. Used in as notification flags. CAN chip status change. Used in as notification flags.An environment variable was changed by a script. Note that you will not be notified when an environment variable is updated from the Canlib API. Used in as notification flags. Notify on bus on/off status changed. Used in as notification flags. Notify on device removed. These defines are used when allocating object buffers using . The requested buffer is an auto-response buffer. The requested buffer is an auto-transmit buffer. This constant is used in . Not Affected/Not available. SWC Sleep Mode. SWC Normal Mode. SWC High-Speed Mode. SWC Wakeup Mode. Sleep mode for those supporting it. Normal mode (the inverse of sleep mode) for those supporting it. Standby for those who support it. Truck and Trailer: operating mode single wire using CAN high. Truck and Trailer: operating mode single wire using CAN low. Reserved for OEM apps. Reserved for OEM apps. Reserved for OEM apps. Reserved for OEM apps. Transceiver (logical) types. Unknown or undefined. 82c251 82c252, TJA1053, TJA1054 Optoisolated 82C251. Unknown or undefined. AU5790 prototype. AU5790. Unknown or undefined. 82c251 with fibre extension K-line + 82c251. K-line, without CAN. TJA1054 with optical isolation. AU5790 with optical isolation. B10011S Truck-And-Trailer. TJA1050. TJA1050 with optical isolation. TJA1041. TJA1041 with optical isolation. RS485 (i.e. J1708) LIN. KONE. CAN-FD. HYBRID CAN-FD/LIN. Unknown or undefined. Unknown or undefined. Unknown or undefined. Unknown or undefined. Unknown or undefined. These defines are used in . 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 These defines are used in . 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). These defines are used in . buffer points to an array of 6 32-bit unsigned integers which receive the compilation date in Coordinated Universal Time(UTC) of the compiled script file(.txe). These defines are used in . buffer points to an area which receives a zero-terminated string with a description of the compiled script file(.txe). These defines are used in . 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). These defines are used in . buffer points to a single unsigned integer which receives the size of the compiled code of the compiled script file(.txe). These defines are used in . buffer points to a single unsigned integer which will receive a non-zero value if the compiled script file (.txe) contents is encrypted. Version number of the canlib32.dll file coded as an unsigned 16-bit word. Product version number of CANlib coded as an unsigned 16-bit word. Product version number of canlib32.dll coded as an unsigned 32-bit word. Returns 1 if the present version is a beta (preview) release, or 0 if it is an official release. Unkown bus type. Note. Not inplemented in linux. Bus of type PCI. Note. Not inplemented in linux. Bus of type PCMCIA. Note. Not inplemented in linux. Bus of type USB. Note. Not inplemented in linux. Bus of type WLAN. Note. Not inplemented in linux. Bus of type PCI Express. Note. Not inplemented in linux. Bus of type ISA. Note. Not inplemented in linux. Bus of type virtual. Note. Not inplemented in linux. Bus of type PC104+. Note. Not inplemented in linux. Bus of type LAN. Note. Not inplemented in linux. BusType Virtual. BusType Local. BusType Remote. BusType Internal. Used in and . Device is running or should be running in interface mode. Used in and . Device is running or should be running in logger mode. This define is used in . It defines the type of the envvar as int. This define is used in . It defines the type of the envvar as float. This define is used in . It defines the type of the envvar as string. This define is used in . It defines an event of type "key pressed". This constant is used in . Turn all LEDs on. This constant is used in . Turn all LEDs off. This constant is used in . Turn LED 0 on. This constant is used in . Turn LED 0 off. This constant is used in . Turn LED 1 on. This constant is used in . Turn LED 1 off. This constant is used in . Turn LED 2 on. This constant is used in . Turn LED 2 off. This constant is used in . Turn LED 3 on. This constant is used in . Turn LED 3 off. This constant is used in . Turn LED 4 on. This constant is used in . Turn LED 4 off. This constant is used in . Turn LED 5 on. This constant is used in . Turn LED 5 off. This constant is used in . Turn LED 6 on. This constant is used in . Turn LED 6 off. This constant is used in . Turn LED 7 on. This constant is used in . Turn LED 7 off. This constant is used in . Turn LED 8 on. This constant is used in . Turn LED 8 off. This constant is used in . Turn LED 9 on. This constant is used in . Turn LED 9 off. This constant is used in . Turn LED 10 on. This constant is used in . Turn LED 10 off. This constant is used in . Turn LED 11 on. This constant is used in . Turn LED 11 off. Script stop modes. Used by . Stop a running script . Script stop modes. Used by . Request termination of a hanged script. These defines are used in for printf message subscribe/unsubscribe. Cancel subscription of printf messages from script slots. These defines are used in for printf message subscribe/unsubscribe. Cancel subscription of printf messages from script slots. These defines are used in for printf message subscribe/unsubscribe. Cancel subscription of printf messages from script slots. Script status flag bits. Used by . The slot is loaded with a script. Script status flag bits. Used by . The slot is running a script. Indicates an invalid canHandle. Notify message sent to the application window. This class is used in and . It represents a digital add-on module. The type of the module. Digital Out Digital In This class is used in and . It represents a digital internal module The type of the module. Digital Out (Bit 0), Digital In (Bit 1) This class is used in and . It represents a relay add-on module. [StructLayout(LayoutKind.Sequential)] The type of the module. Relay Out Digital In This class is used in and . It represents an analog add-on module. The type of the module. Analog Out 1 Analog Out 2 Analog Out 3 Analog Out 4 Analog In 1 Analog In 2 Analog In 3 Analog In 4