# canlib.kvDevice

class `canlib.kvDevice.``kvDevice`(ch=None, flags=0, canlibHnd=None, ean=None, serial=None, cardChannel=0)

  Holds information about a Kvaser CAN device

  Parameters: | ch (int) – CANlib channel where the device is currently connected. flags (int) – Optional flags such as canlib.canOPEN_EXCLUSIVE. canlibHnd – Optional canlib.canlib object, usually creates a new one. ean (str) – EAN for the device, e.g. “73-30130-00778-9”. Used instead of ch. serial (str) – Optional serial number of the device, can be used in conjuntion with ean. cardChannel (int) – Optional local channel on card, can be used in conjunction with ean.

  static `allDevices`(reinitialize=True)
  `cardChannel`()

    Read card channel number from device

    Returns: | cardChannel (int) – The local channel on card, first channel is number 0.

  `cardChannels`()
  `cardNumber`()
  `close`()
  `defaultHostname`()
  `driverName`()
  `ean`()
  static `ean2ean_hi`(ean)
  static `ean2ean_lo`(ean)
  static `ean_hi_lo2ean`(ean_hi, ean_lo)
  `fw`()
  `hasScript`()
  `isLogger`()
  `lastKnowncanlibChannel`()
  `memoClose`()
  `memoOpen`(deviceType=<Device.MHYDRA_EXT: 1>)
  `memoOpenEx`()
  `memoReadEvents`(fileIndx)
  `name`()
  `open`(flags=0, timeout=10, unloadCanlib=False)
  `readConfig`()
  `serial`()
  `setModeNormal`()
  `setModeVirtualLogger`()
  `write`(frame)

    Write a CAN message to the bus.

    Parameters: | frame (canlib.frame.Frame) – The data frame to be sent

  `writeConfig`(config=None)
  `writeWait`(frame, timeout)

    Write a CAN message to the bus.

    Parameters: | message (canlib.frame.Frame) – The data frame to send