Resources.cpp
Go to the documentation of this file.
1 #include "Resources.hpp"
2 
3 #include <array>
4 #include <cassert>
5 #include <condition_variable>
6 #include <fstream>
7 #include <iostream>
8 #include <thread>
9 
10 // libarchive
11 #include "archive.h"
12 #include "archive_entry.h"
13 
14 // spdlog
15 #include "spdlog/details/os.h"
16 #include "spdlog/fmt/chrono.h"
17 #include "spdlog/spdlog.h"
18 #include "utility/Logging.hpp"
19 
20 // shared
24 
25 // project
26 #include "utility/Environment.hpp"
27 #include "utility/spdlog-fmt.hpp"
28 
29 extern "C" {
30 #include "bspatch/bspatch.h"
31 }
32 
33 // Resource compiled assets (cmds)
34 #ifdef DEPTHAI_RESOURCE_COMPILED_BINARIES
35  #include "cmrc/cmrc.hpp"
36 CMRC_DECLARE(depthai);
37 #endif
38 
39 namespace dai {
40 
41 static std::vector<std::uint8_t> createPrebootHeader(const std::vector<uint8_t>& payload, uint32_t magic1, uint32_t magic2);
42 
43 constexpr static auto CMRC_DEPTHAI_DEVICE_TAR_XZ = "depthai-device-fwp-" DEPTHAI_DEVICE_VERSION ".tar.xz";
44 
45 // Main FW
46 constexpr static auto DEPTHAI_CMD_OPENVINO_UNIVERSAL_PATH = "depthai-device-openvino-universal-" DEPTHAI_DEVICE_VERSION ".cmd";
49 
50 // Patches from Main FW
51 constexpr static auto DEPTHAI_CMD_OPENVINO_2020_4_PATCH_PATH = "depthai-device-openvino-2020.4-" DEPTHAI_DEVICE_VERSION ".patch";
52 constexpr static auto DEPTHAI_CMD_OPENVINO_2021_1_PATCH_PATH = "depthai-device-openvino-2021.1-" DEPTHAI_DEVICE_VERSION ".patch";
53 constexpr static auto DEPTHAI_CMD_OPENVINO_2021_2_PATCH_PATH = "depthai-device-openvino-2021.2-" DEPTHAI_DEVICE_VERSION ".patch";
54 constexpr static auto DEPTHAI_CMD_OPENVINO_2021_3_PATCH_PATH = "depthai-device-openvino-2021.3-" DEPTHAI_DEVICE_VERSION ".patch";
55 
56 // Creates std::array without explicitly needing to state the size
57 template <typename V, typename... T>
58 static constexpr auto array_of(T&&... t) -> std::array<V, sizeof...(T)> {
59  return {{std::forward<T>(t)...}};
60 }
61 
62 constexpr static auto RESOURCE_LIST_DEVICE = array_of<const char*>(DEPTHAI_CMD_OPENVINO_UNIVERSAL_PATH,
67 
68 std::vector<std::uint8_t> Resources::getDeviceFirmware(Device::Config config, dai::Path pathToMvcmd) const {
69  // Wait until lazy load is complete
70  {
71  std::unique_lock<std::mutex> lock(mtxDevice);
72  cvDevice.wait(lock, [this]() { return readyDevice; });
73  }
74 
75  std::vector<std::uint8_t> finalFwBinary;
76 
77  // Get OpenVINO version
78  auto& version = config.version;
79 
80  // Check if pathToMvcmd variable is set
81  dai::Path finalFwBinaryPath;
82  if(!pathToMvcmd.empty()) {
83  finalFwBinaryPath = pathToMvcmd;
84  }
85  // Override if env variable DEPTHAI_DEVICE_BINARY is set
86  dai::Path fwBinaryPath = utility::getEnv("DEPTHAI_DEVICE_BINARY");
87  if(!fwBinaryPath.empty()) {
88  finalFwBinaryPath = fwBinaryPath;
89  }
90  // Return binary from file if any of above paths are present
91  if(!finalFwBinaryPath.empty()) {
92  // Load binary file at path
93  std::ifstream stream(finalFwBinaryPath, std::ios::binary);
94  if(!stream.is_open()) {
95  // Throw an error
96  // TODO(themarpe) - Unify exceptions into meaningful groups
97  throw std::runtime_error(
98  fmt::format("File at path {}{} doesn't exist.", finalFwBinaryPath, !fwBinaryPath.empty() ? " pointed to by DEPTHAI_DEVICE_BINARY" : ""));
99  }
100  logger::warn("Overriding firmware: {}", finalFwBinaryPath);
101  // Read the file and return its contents
102  finalFwBinary = std::vector<std::uint8_t>(std::istreambuf_iterator<char>(stream), {});
103  } else {
104 // Binaries are resource compiled
105 #ifdef DEPTHAI_RESOURCE_COMPILED_BINARIES
106 
107  std::unordered_set<OpenVINO::Version> deprecatedVersions(
109 
110  if(deprecatedVersions.count(version)) {
111  logger::warn("OpenVINO {} is deprecated!", OpenVINO::getVersionName(version));
112  }
113 
114  // Main FW
115  std::vector<std::uint8_t> depthaiBinary;
116  // Patch from main to specified
117  std::vector<std::uint8_t> depthaiPatch;
118 
119  switch(version) {
121  throw std::runtime_error(fmt::format("OpenVINO {} is not available anymore", OpenVINO::getVersionName(version)));
122  break;
123 
126  break;
127 
130  break;
131 
134  break;
135 
138  break;
139 
142  case MAIN_FW_VERSION:
143  depthaiBinary = resourceMapDevice.at(MAIN_FW_PATH);
144  break;
145  }
146 
147  // is patching required?
148  if(!depthaiPatch.empty()) {
149  logger::debug("Patching OpenVINO FW version from {} to {}", OpenVINO::getVersionName(MAIN_FW_VERSION), OpenVINO::getVersionName(version));
150 
151  // Load full binary for patch
152  depthaiBinary = resourceMapDevice.at(MAIN_FW_PATH);
153 
154  // Get new size
155  int64_t patchedSize = bspatch_mem_get_newsize(depthaiPatch.data(), depthaiPatch.size());
156 
157  // Reserve space for patched binary
158  std::vector<std::uint8_t> tmpDepthaiBinary{};
159  tmpDepthaiBinary.resize(patchedSize);
160 
161  // Patch
162  int error = bspatch_mem(depthaiBinary.data(), depthaiBinary.size(), depthaiPatch.data(), depthaiPatch.size(), tmpDepthaiBinary.data());
163 
164  // if patch not successful
165  if(error > 0) {
166  throw std::runtime_error(fmt::format(
167  "Error while patching OpenVINO FW version from {} to {}", OpenVINO::getVersionName(MAIN_FW_VERSION), OpenVINO::getVersionName(version)));
168  }
169 
170  // Change depthaiBinary to tmpDepthaiBinary
171  depthaiBinary = std::move(tmpDepthaiBinary);
172  }
173 
174  finalFwBinary = std::move(depthaiBinary);
175 
176 #else
177  // Binaries from default path (TODO)
178 
179 #endif
180  }
181 
182  // Prepend preboot config
183  // Serialize preboot
184  auto prebootPayload = utility::serialize(config.board);
185  auto prebootHeader = createPrebootHeader(prebootPayload, BOARD_CONFIG_MAGIC1, BOARD_CONFIG_MAGIC2);
186  finalFwBinary.insert(finalFwBinary.begin(), prebootHeader.begin(), prebootHeader.end());
187 
188  // Return created firmware
189  return finalFwBinary;
190 }
191 
192 constexpr static auto CMRC_DEPTHAI_BOOTLOADER_TAR_XZ = "depthai-bootloader-fwp-" DEPTHAI_BOOTLOADER_VERSION ".tar.xz";
193 constexpr static auto DEVICE_BOOTLOADER_USB_PATH = "depthai-bootloader-usb.cmd";
194 constexpr static auto DEVICE_BOOTLOADER_ETH_PATH = "depthai-bootloader-eth.cmd";
195 
196 constexpr static std::array<const char*, 2> RESOURCE_LIST_BOOTLOADER = {
199 };
200 
202  // Wait until lazy load is complete
203  {
204  std::unique_lock<std::mutex> lock(mtxBootloader);
205  cvDevice.wait(lock, [this]() { return readyBootloader; });
206  }
207 
208  // Check if env variable DEPTHAI_BOOTLOADER_BINARY_USB/_ETH is set
209  std::string blEnvVar;
211  blEnvVar = "DEPTHAI_BOOTLOADER_BINARY_USB";
212  } else if(type == dai::bootloader::Type::NETWORK) {
213  blEnvVar = "DEPTHAI_BOOTLOADER_BINARY_ETH";
214  }
215  dai::Path blBinaryPath = utility::getEnv(blEnvVar);
216  if(!blBinaryPath.empty()) {
217  // Load binary file at path
218  std::ifstream stream(blBinaryPath, std::ios::binary);
219  if(!stream.is_open()) {
220  // Throw an error
221  // TODO(themarpe) - Unify exceptions into meaningful groups
222  throw std::runtime_error(fmt::format("File at path {} pointed to by {} doesn't exist.", blBinaryPath, blEnvVar));
223  }
224  logger::warn("Overriding bootloader {}: {}", blEnvVar, blBinaryPath);
225  // Read the file and return its content
226  return std::vector<std::uint8_t>(std::istreambuf_iterator<char>(stream), {});
227  }
228 
229  switch(type) {
231  throw std::invalid_argument("DeviceBootloader::Type::AUTO not allowed, when getting bootloader firmware.");
232  break;
233 
236  break;
237 
240  break;
241 
242  default:
243  throw std::invalid_argument("Invalid Bootloader Type specified.");
244  break;
245  }
246 }
247 
249  static Resources instance; // Guaranteed to be destroyed, instantiated on first use.
250  return instance;
251 }
252 
253 template <typename CV, typename BOOL, typename MTX, typename PATH, typename LIST, typename MAP>
254 std::function<void()> getLazyTarXzFunction(MTX& mtx, CV& cv, BOOL& ready, PATH cmrcPath, LIST& resourceList, MAP& resourceMap) {
255  return [&mtx, &cv, &ready, cmrcPath, &resourceList, &resourceMap] {
256  using namespace std::chrono;
257 
258  // Get binaries from internal sources
259  auto fs = cmrc::depthai::get_filesystem();
260  auto tarXz = fs.open(cmrcPath);
261 
262  auto t1 = steady_clock::now();
263 
264  // Load tar.xz archive from memory
265  struct archive* a = archive_read_new();
266  archive_read_support_filter_xz(a);
267  archive_read_support_format_tar(a);
268  int r = archive_read_open_memory(a, tarXz.begin(), tarXz.size());
269  assert(r == ARCHIVE_OK);
270 
271  auto t2 = steady_clock::now();
272 
273  struct archive_entry* entry;
274  while(archive_read_next_header(a, &entry) == ARCHIVE_OK) {
275  // Check whether filename matches to one of required resources
276  for(const auto& cpath : resourceList) {
277  std::string resPath(cpath);
278  if(resPath == std::string(archive_entry_pathname(entry))) {
279  // Create an emtpy entry
280  resourceMap[resPath] = std::vector<std::uint8_t>();
281 
282  // Read size, 16KiB
283  std::size_t readSize = 16 * 1024;
284  if(archive_entry_size_is_set(entry)) {
285  // if size is specified, use that for read size
286  readSize = archive_entry_size(entry);
287  }
288 
289  // Record number of bytes actually read
290  long long finalSize = 0;
291 
292  while(true) {
293  // Current size, as a offset to write next data to
294  auto currentSize = resourceMap[resPath].size();
295 
296  // Resize to accomodate for extra data
297  resourceMap[resPath].resize(currentSize + readSize);
298  long long size = archive_read_data(a, &resourceMap[resPath][currentSize], readSize);
299 
300  // Assert that no errors occurred
301  assert(size >= 0);
302 
303  // Append number of bytes actually read to finalSize
304  finalSize += size;
305 
306  // All bytes were read
307  if(size == 0) {
308  break;
309  }
310  }
311 
312  // Resize vector to actual read size
313  resourceMap[resPath].resize(finalSize);
314 
315  // Entry found - go to next required resource
316  break;
317  }
318  }
319  }
320  r = archive_read_free(a); // Note 3
321  assert(r == ARCHIVE_OK);
322  // Ignore 'r' variable when in Release build
323  (void)r;
324 
325  // Check that all resources were read
326  for(const auto& cpath : resourceList) {
327  std::string resPath(cpath);
328  assert(resourceMap.count(resPath) > 0);
329  }
330 
331  auto t3 = steady_clock::now();
332 
333  // Debug - logs loading times
335  "Resources - Archive '{}' open: {}, archive read: {}", cmrcPath, duration_cast<milliseconds>(t2 - t1), duration_cast<milliseconds>(t3 - t2));
336 
337  // Notify that that preload is finished
338  {
339  std::unique_lock<std::mutex> l(mtx);
340  ready = true;
341  }
342  cv.notify_all();
343  };
344 }
345 
347  // Preinit libarchive
348  struct archive* a = archive_read_new();
349  auto r = archive_read_free(a);
350  assert(r == ARCHIVE_OK);
351  // Ignore 'r' variable when in Release build
352  (void)r;
353 
354  // Device resources
355  // Create a thread which lazy-loads firmware resources package
357 
358  // Bootloader resources
359  // Create a thread which lazy-loads firmware resources package
360  lazyThreadBootloader = std::thread(
362 }
363 
365  // join the lazy threads
366  if(lazyThreadDevice.joinable()) lazyThreadDevice.join();
367  if(lazyThreadBootloader.joinable()) lazyThreadBootloader.join();
368 }
369 
370 // Get device firmware
371 std::vector<std::uint8_t> Resources::getDeviceFirmware(bool usb2Mode, OpenVINO::Version version) const {
372  Device::Config cfg;
373  if(usb2Mode) {
375  } else {
377  }
378  cfg.version = version;
379 
380  return getDeviceFirmware(cfg);
381 }
382 
383 std::vector<std::uint8_t> createPrebootHeader(const std::vector<uint8_t>& payload, uint32_t magic1, uint32_t magic2) {
384  // clang-format off
385  const std::uint8_t HEADER[] = {77, 65, 50, 120,
386  // WD Protection
387  // TODO(themarpe) - expose timings
388  0x9A, 0xA8, 0x00, 0x32, 0x20, 0xAD, 0xDE, 0xD0, 0xF1,
389  0x9A, 0x9C, 0x00, 0x32, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
390  0x9A, 0xA8, 0x00, 0x32, 0x20, 0xAD, 0xDE, 0xD0, 0xF1,
391  0x9A, 0xA4, 0x00, 0x32, 0x20, 0x01, 0x00, 0x00, 0x00,
392  0x8A,
393  static_cast<uint8_t>((magic1 >> 0) & 0xFF),
394  static_cast<uint8_t>((magic1 >> 8) & 0xFF),
395  static_cast<uint8_t>((magic1 >> 16) & 0xFF),
396  static_cast<uint8_t>((magic1 >> 24) & 0xFF)};
397  // clang-format on
398 
399  // Store the constructed board information
400  std::vector<std::uint8_t> prebootHeader;
401 
402  // Store initial header
403  prebootHeader.insert(prebootHeader.begin(), std::begin(HEADER), std::end(HEADER));
404 
405  // Calculate size
406  std::size_t totalPayloadSize = payload.size() + sizeof(magic2) + sizeof(uint32_t) + sizeof(uint32_t);
407  std::size_t toAddBytes = 0;
408  if(totalPayloadSize % 4 != 0) {
409  toAddBytes = 4 - (totalPayloadSize % 4);
410  }
411  std::size_t totalSize = totalPayloadSize + toAddBytes;
412  std::size_t totalSizeWord = totalSize / 4;
413 
414  // Write size in words in little endian
415  prebootHeader.push_back((totalSizeWord >> 0) & 0xFF);
416  prebootHeader.push_back((totalSizeWord >> 8) & 0xFF);
417 
418  // Compute payload checksum
419  auto checksum = utility::checksum(payload.data(), payload.size());
420 
421  // Write checksum & payload size as uint32_t LE
422  for(const auto& field : {magic2, checksum, static_cast<uint32_t>(payload.size())}) {
423  for(int i = 0; i < 4; i++) {
424  prebootHeader.push_back((field >> (i * 8)) & 0xFF);
425  }
426  }
427 
428  // Copy payload
429  prebootHeader.insert(prebootHeader.end(), payload.begin(), payload.end());
430  // Add missing bytes
431  for(std::size_t i = 0; i < toAddBytes; i++) {
432  prebootHeader.push_back(0x00);
433  }
434 
435  return prebootHeader;
436 }
437 
438 } // namespace dai
dai::Resources
Definition: Resources.hpp:18
dai::Resources::readyDevice
bool readyDevice
Definition: Resources.hpp:26
dai::Resources::readyBootloader
bool readyBootloader
Definition: Resources.hpp:32
dai::Path::empty
bool empty() const noexcept
Observes if path is empty (contains no string/folders/filename)
Definition: Path.hpp:194
dai::RESOURCE_LIST_BOOTLOADER
constexpr static std::array< const char *, 2 > RESOURCE_LIST_BOOTLOADER
Definition: Resources.cpp:196
dai::createPrebootHeader
static std::vector< std::uint8_t > createPrebootHeader(const std::vector< uint8_t > &payload, uint32_t magic1, uint32_t magic2)
Definition: Resources.cpp:383
dai::DEPTHAI_CMD_OPENVINO_UNIVERSAL_PATH
constexpr static auto DEPTHAI_CMD_OPENVINO_UNIVERSAL_PATH
Definition: Resources.cpp:46
Checksum.hpp
dai::DeviceBase::Config::board
BoardConfig board
Definition: DeviceBase.hpp:74
dai::OpenVINO::Version
Version
OpenVINO Version supported version information.
Definition: OpenVINO.hpp:20
Environment.hpp
dai::OpenVINO::VERSION_2020_4
@ VERSION_2020_4
Definition: OpenVINO.hpp:20
Resources.hpp
dai::DEVICE_BOOTLOADER_ETH_PATH
constexpr static auto DEVICE_BOOTLOADER_ETH_PATH
Definition: Resources.cpp:194
dai::MAIN_FW_VERSION
constexpr static auto MAIN_FW_VERSION
Definition: Resources.cpp:48
bspatch_mem_get_newsize
int64_t bspatch_mem_get_newsize(const uint8_t *patchfile_bin, const int64_t patchfile_size)
Definition: bspatch.c:60
dai::array_of
static constexpr auto array_of(T &&... t) -> std::array< V, sizeof...(T)>
Definition: Resources.cpp:58
dai::MAIN_FW_PATH
constexpr static auto MAIN_FW_PATH
Definition: Resources.cpp:47
dai::logger::debug
void debug(const FormatString &fmt, Args &&...args)
Definition: Logging.hpp:72
dai::logger::warn
void warn(const FormatString &fmt, Args &&...args)
Definition: Logging.hpp:84
dai::utility::serialize
bool serialize(const T &obj, std::vector< std::uint8_t > &data)
Definition: Serialization.hpp:38
dai::utility::checksum
std::uint32_t checksum(const void *buffer, std::size_t size, uint32_t prevChecksum)
Definition: Checksum.cpp:6
dai::RESOURCE_LIST_DEVICE
constexpr static auto RESOURCE_LIST_DEVICE
Definition: Resources.cpp:62
dai::Resources::getInstance
static Resources & getInstance()
Definition: Resources.cpp:248
dai::bootloader::Type
Type
Definition: Type.hpp:11
bspatch_mem
int bspatch_mem(const uint8_t *oldfile_bin, const int64_t oldfile_size, const uint8_t *patchfile_bin, const int64_t patchfile_size, uint8_t *newfile_bin)
Definition: bspatch.c:75
dai::DEPTHAI_CMD_OPENVINO_2021_3_PATCH_PATH
constexpr static auto DEPTHAI_CMD_OPENVINO_2021_3_PATCH_PATH
Definition: Resources.cpp:54
dai::utility::getEnv
std::string getEnv(const std::string &var)
Definition: Environment.cpp:18
dai::BOARD_CONFIG_MAGIC2
constexpr static uint32_t BOARD_CONFIG_MAGIC2
Definition: BoardConfig.hpp:21
dai::Resources::resourceMapBootloader
std::unordered_map< std::string, std::vector< std::uint8_t > > resourceMapBootloader
Definition: Resources.hpp:33
dai::BOARD_CONFIG_MAGIC1
constexpr static uint32_t BOARD_CONFIG_MAGIC1
Definition: BoardConfig.hpp:20
DAI_SPAN_NAMESPACE_NAME::detail::size
constexpr auto size(const C &c) -> decltype(c.size())
Definition: span.hpp:167
dai::bootloader::Type::NETWORK
@ NETWORK
dai::UsbSpeed::HIGH
@ HIGH
dai::bootloader::Type::AUTO
@ AUTO
dai::Resources::lazyThreadBootloader
std::thread lazyThreadBootloader
Definition: Resources.hpp:31
dai::bootloader::Type::USB
@ USB
dai::Resources::~Resources
~Resources()
Definition: Resources.cpp:364
dai::Resources::getDeviceFirmware
std::vector< std::uint8_t > getDeviceFirmware(bool usb2Mode, OpenVINO::Version version=OpenVINO::VERSION_UNIVERSAL) const
Definition: Resources.cpp:371
dai::logger::error
void error(const FormatString &fmt, Args &&...args)
Definition: Logging.hpp:90
dai::BoardConfig::USB::maxSpeed
UsbSpeed maxSpeed
Definition: BoardConfig.hpp:28
BoardConfig.hpp
dai::OpenVINO::VERSION_2020_3
@ VERSION_2020_3
Definition: OpenVINO.hpp:20
dai::OpenVINO::VERSION_2021_4
@ VERSION_2021_4
Definition: OpenVINO.hpp:20
dai::utility::mtx
static std::mutex mtx
Definition: Environment.cpp:15
nanorpc::core::detail::pack::meta::type
type
Definition: pack_meta.h:26
dai::OpenVINO::VERSION_2022_1
@ VERSION_2022_1
Definition: OpenVINO.hpp:20
dai::Resources::cvBootloader
std::condition_variable cvBootloader
Definition: Resources.hpp:30
dai::Resources::mtxDevice
std::mutex mtxDevice
Definition: Resources.hpp:23
dai::DEVICE_BOOTLOADER_USB_PATH
constexpr static auto DEVICE_BOOTLOADER_USB_PATH
Definition: Resources.cpp:193
Serialization.hpp
dai::DEPTHAI_CMD_OPENVINO_2020_4_PATCH_PATH
constexpr static auto DEPTHAI_CMD_OPENVINO_2020_4_PATCH_PATH
Definition: Resources.cpp:51
dai::Resources::mtxBootloader
std::mutex mtxBootloader
Definition: Resources.hpp:29
dai::OpenVINO::VERSION_UNIVERSAL
@ VERSION_UNIVERSAL
Definition: OpenVINO.hpp:20
dai::OpenVINO::VERSION_2021_1
@ VERSION_2021_1
Definition: OpenVINO.hpp:20
dai::getLazyTarXzFunction
std::function< void()> getLazyTarXzFunction(MTX &mtx, CV &cv, BOOL &ready, PATH cmrcPath, LIST &resourceList, MAP &resourceMap)
Definition: Resources.cpp:254
dai::DeviceBase::Config::version
OpenVINO::Version version
Definition: DeviceBase.hpp:73
dai::Resources::getBootloaderFirmware
std::vector< std::uint8_t > getBootloaderFirmware(DeviceBootloader::Type type=DeviceBootloader::Type::USB) const
Definition: Resources.cpp:201
dai::OpenVINO::getVersionName
static std::string getVersionName(Version version)
Definition: OpenVINO.cpp:67
dai::DeviceBase::Config
Definition: DeviceBase.hpp:72
dai::BoardConfig::usb
USB usb
Definition: BoardConfig.hpp:32
spdlog-fmt.hpp
dai::DEPTHAI_CMD_OPENVINO_2021_1_PATCH_PATH
constexpr static auto DEPTHAI_CMD_OPENVINO_2021_1_PATCH_PATH
Definition: Resources.cpp:52
dai::Resources::lazyThreadDevice
std::thread lazyThreadDevice
Definition: Resources.hpp:25
dai::Resources::resourceMapDevice
std::unordered_map< std::string, std::vector< std::uint8_t > > resourceMapDevice
Definition: Resources.hpp:27
bspatch.h
dai::Path
Represents paths on a filesystem; accepts utf-8, Windows utf-16 wchar_t, or std::filesystem::path.
Definition: Path.hpp:27
Logging.hpp
dai::CMRC_DEPTHAI_BOOTLOADER_TAR_XZ
constexpr static auto CMRC_DEPTHAI_BOOTLOADER_TAR_XZ
Definition: Resources.cpp:192
dai::Resources::cvDevice
std::condition_variable cvDevice
Definition: Resources.hpp:24
dai
Definition: CameraExposureOffset.hpp:6
dai::OpenVINO::VERSION_2021_2
@ VERSION_2021_2
Definition: OpenVINO.hpp:20
dai::DeviceBase::DEFAULT_USB_SPEED
static constexpr UsbSpeed DEFAULT_USB_SPEED
Default UsbSpeed for device connection.
Definition: DeviceBase.hpp:59
dai::CMRC_DEPTHAI_DEVICE_TAR_XZ
constexpr static auto CMRC_DEPTHAI_DEVICE_TAR_XZ
Definition: Resources.cpp:43
dai::OpenVINO::VERSION_2021_3
@ VERSION_2021_3
Definition: OpenVINO.hpp:20
dai::Resources::Resources
Resources()
Definition: Resources.cpp:346
dai::DEPTHAI_CMD_OPENVINO_2021_2_PATCH_PATH
constexpr static auto DEPTHAI_CMD_OPENVINO_2021_2_PATCH_PATH
Definition: Resources.cpp:53


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19