# Miscellaneous

## dllversion()

`canlib.canlib.``dllversion`()

  Get the CANlib DLL version number

  Parameters: | None

  Returns a `BetaVersionNumber` if the CANlib DLL is marked as beta (preview), otherwise returns `VersionNumber`.

  Changed in version 1.6.

## getErrorText()

`canlib.canlib.``getErrorText`(error_code)

  Return error text for supplied error_code

## getNumberOfChannels()

`canlib.canlib.``getNumberOfChannels`(driver=False)

  Get number of available CAN channels.

  Returns the number of available CAN channels in the computer. The virtual channels are included in this number.

  Parameters: | None
  Returns: | chanCount (int) – Number of available CAN channels

## getVersion()

`canlib.canlib.``getVersion`()

  Get the CANlib DLL version number as a `str`

  Deprecated since version 1.5: Use `dllversion` instead.

## prodversion()

`canlib.canlib.``prodversion`()

  Get the CANlib Product version number

  Parameters: | None

  Returns a `BetaVersionNumber` if the CANlib driver/DLL is marked as beta (preview), otherwise returns `VersionNumber`.

  New in version 1.6.

## reinitializeLibrary()

`canlib.canlib.``reinitializeLibrary`()

  Reinitializes the CANlib driver.

  Convenience function that calls `unloadLibrary` and `initializeLibrary` in succession.

## ScriptText

class `canlib.canlib.``ScriptText`

  Text returned by `Channel.scriptGetText`

  Subclass of built-in `str`, so it can be used just like a normal string.

  It also has the following attributes:

  Variables: | slot (`int`) – Which script-slot the text came from. time (`int`) – Timestamp of when the text was printed. ScriptText.flags (`canlib.canlib.Stat`) – Any flags associated with the text.

  New in version 1.7.

## translateBaud()

`canlib.canlib.``translateBaud`(freq)

  Translate bitrate constant

  This function translates the canBITRATE_xxx constants to their corresponding bus parameter values.

  Parameters: | freq – Any of the predefined constants canBITRATE_xxx
  Returns: | A BitrateSetting object containing the actual values of frequency, tseg1, tseg2 etc.

## unloadLibrary()

`canlib.canlib.``unloadLibrary`()

  Unload CANlib

  Unload canlib and release all internal handles.

  Warning

  Calling `unloadLibrary` invalidates every canlib-object. Use at your own risk.