33 #if defined(SL_OC_COMPIL)
34 #define SL_OC_EXPORT __declspec(dllexport)
36 #define SL_OC_EXPORT __declspec(dllimport)
39 #define SL_OC_EXPORT __attribute__((visibility("default")))
40 #if defined(__arm__) || defined(__aarch64__)
46 #define ZED_OC_MAJOR_VERSION 0
47 #define ZED_OC_MINOR_VERSION 6
48 #define ZED_OC_PATCH_VERSION 0
50 #define ZED_OC_VERSION_ATTRIBUTE private: uint32_t mMajorVer = ZED_OC_MAJOR_VERSION, mMinorVer = ZED_OC_MINOR_VERSION, mPatchVer = ZED_OC_PATCH_VERSION
53 #define INFO_OUT(lvl,msg) { int status_dem_0; if (lvl>=3) std::cout << "[" << abi::__cxa_demangle(typeid(*this).name(), 0, 0, &status_dem_0) << "] INFO: " << msg << std::endl; }
54 #define WARNING_OUT(lvl,msg) { int status_dem_0; if (lvl>=2) std::cerr << "[" << abi::__cxa_demangle(typeid(*this).name(), 0, 0, &status_dem_0) << "] WARNING: " << msg << std::endl; }
55 #define ERROR_OUT(lvl,msg) { int status_dem_0; if (lvl>=1) std::cerr << "[" << abi::__cxa_demangle(typeid(*this).name(), 0, 0, &status_dem_0) << "] ERROR: " << msg << std::endl; }
63 inline uint64_t
getSteadyTimestamp() {
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();}
69 inline uint64_t
getWallTimestamp() {
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count();}
73 static const uint16_t SL_USB_VENDOR = 0x2b03;
75 static const uint16_t SL_USB_PROD_ZED_REVA = 0xf580;
76 static const uint16_t SL_USB_PROD_ZED_M_REVA = 0xf680;
77 static const uint16_t SL_USB_PROD_ZED_REVB = 0xf582;
78 static const uint16_t SL_USB_PROD_ZED_M_REVB = 0xf682;
79 static const uint16_t SL_USB_PROD_ZED_2_REVB = 0xf780;
80 static const uint16_t SL_USB_PROD_ZED_2i = 0xf880;
81 static const uint16_t SL_USB_PROD_MCU_ZEDM_REVA= 0xf681;
82 static const uint16_t SL_USB_PROD_MCU_ZED2_REVA = 0xf781;
83 static const uint16_t SL_USB_PROD_MCU_ZED2i_REVA = 0xf881;
uint64_t getSteadyTimestamp()
Get the current system clock as steady clock, so with no jumps even if the system time changes.
uint64_t getWallTimestamp()
Get the current system clock as wall clock (it can have jumps if the system clock is updated by a syn...