Class Device

Inheritance Relationships

Base Type

Class Documentation

class Device : public dai::DeviceBase

Represents the DepthAI device with the methods to interact with it. Implements the host-side queues to connect with XLinkIn and XLinkOut nodes

Public Types

enum class ReconnectionStatus

Values:

Public Functions

Device()

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL

~Device() override

dtor to close the device

Platform getPlatform() const

Get the platform of the connected device.

Returns:

Platform Platform enum

std::string getPlatformAsString() const

Get the platform of the connected device as string.

Returns:

std::string String representation of Platform

DeviceBase()

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL

DeviceBase(UsbSpeed maxUsbSpeed)

Connects to device

Parameters:

maxUsbSpeed – Maximum allowed USB speed

DeviceBase(const DeviceInfo &devInfo, UsbSpeed maxUsbSpeed)

Connects to device specified by devInfo.

Parameters:
  • devInfoDeviceInfo which specifies which device to connect to

  • maxUsbSpeed – Maximum allowed USB speed

DeviceBase(const DeviceInfo &devInfo, const std::filesystem::path &pathToCmd)

Connects to device specified by devInfo.

Parameters:
  • devInfoDeviceInfo which specifies which device to connect to

  • pathToCmd – Path to custom device firmware

explicit DeviceBase(Config config)

Connects to any available device with custom config.

Parameters:

configDevice custom configuration to boot with

DeviceBase(Config config, const DeviceInfo &devInfo)

Connects to device ‘devInfo’ with custom config.

Parameters:
  • configDevice custom configuration to boot with

  • devInfoDeviceInfo which specifies which device to connect to

explicit DeviceBase(const DeviceInfo &devInfo)

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL

Parameters:

devInfoDeviceInfo which specifies which device to connect to

DeviceBase(std::string nameOrDeviceId)

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL

Parameters:

nameOrDeviceId – Creates DeviceInfo with nameOrDeviceId to connect to

DeviceBase(std::string nameOrDeviceId, UsbSpeed maxUsbSpeed)

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL

Parameters:
  • nameOrDeviceId – Creates DeviceInfo with nameOrDeviceId to connect to

  • maxUsbSpeed – Maximum allowed USB speed

DeviceBase(Config config, UsbSpeed maxUsbSpeed)

Connects to device specified by devInfo.

Parameters:
  • config – Config with which the device will be booted with

  • maxUsbSpeed – Maximum allowed USB speed

DeviceBase(Config config, const std::filesystem::path &pathToCmd)

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameters:
  • config – Config with which the device will be booted with

  • pathToCmd – Path to custom device firmware

DeviceBase(Config config, const DeviceInfo &devInfo, UsbSpeed maxUsbSpeed)

Connects to device specified by devInfo.

Parameters:
  • config – Config with which the device will be booted with

  • devInfoDeviceInfo which specifies which device to connect to

  • maxUsbSpeed – Maximum allowed USB speed

DeviceBase(Config config, const DeviceInfo &devInfo, const std::filesystem::path &pathToCmd, bool dumpOnly = false)

Connects to device specified by devInfo.

Parameters:
  • config – Config with which the device will be booted with

  • devInfoDeviceInfo which specifies which device to connect to

  • pathToCmd – Path to custom device firmware

  • dumpOnly – If true only the minimal connection is established to retrieve the crash dump