189 if (hwmon_response_report.find(e) != hwmon_response_report.end())
190 return hwmon_response_report.at(e);
203 const std::vector<uint8_t>&
data,
204 int timeout_ms = 5000,
205 bool require_response =
true)
211 if (!token.get())
throw;
217 std::lock_guard<platform::uvc_device>
lock(dev);
241 int timeout_ms = 5000;
242 bool require_response =
true;
245 int param3 = 0,
int param4 = 0,
int timeout_ms = 5000,
246 bool require_response =
true)
247 : cmd(cmd), param1(param1),
249 param3(param3), param4(param4),
250 timeout_ms(timeout_ms), require_response(require_response)
280 sizeOfSendCommandData(0),
283 receivedCommandDataLength(0)
294 timeOut(cmd.timeout_ms),
295 oneDirection(!cmd.require_response),
296 receivedCommandDataLength(0)
314 static void update_cmd_details(
hwmon_cmd_details& details,
size_t receivedCmdLen,
unsigned char* outputBuffer);
320 : _locked_transfer(
std::
move(locked_transfer))
323 static void fill_usb_buffer(
int opCodeNumber,
333 std::vector< uint8_t > send( std::vector< uint8_t >
const & data )
const;
335 void get_gvd(
size_t sz,
unsigned char* gvd,
uint8_t gvd_cmd)
const;
336 static std::string get_firmware_version_string(
const std::vector<uint8_t>& buff,
size_t index,
size_t length = 4);
337 static std::string get_module_serial_string(
const std::vector<uint8_t>& buff,
size_t index,
size_t length = 6);
340 template <
typename T>
344 if (index +
sizeof(
T) >= data.size())
345 throw new std::runtime_error(
"get_gvd_field - index out of bounds, buffer size: " +
347 for (
int i = 0;
i <
sizeof(
T);
i++)
348 rv += data[index +
i] << (
i * 8);
uvc_sensor & _uvc_sensor_base
static const textual_icon lock
const uint8_t IVCAM_MIN_SUPPORTED_VERSION
std::shared_ptr< platform::command_transfer > _command_transfer
const uint8_t IV_COMMAND_FILTER_OPTION
std::string hwmon_error2str(hwmon_response e)
auto invoke_powered(T action) -> decltype(action(*static_cast< platform::uvc_device * >(nullptr)))
const uint16_t HW_MONITOR_DATA_SIZE_OFFSET
const uint8_t IVCAM_MONITOR_HEADER_SIZE
size_t receivedCommandDataLength
size_t receivedCommandDataLength
const uint8_t IV_COMMAND_GET_CALIBRATION_DATA
hwmon_cmd(uint8_t cmd_id)
hwmon_cmd(const command &cmd)
GLsizei const GLchar *const * string
std::shared_ptr< locked_transfer > _locked_transfer
std::array< uint8_t, HW_MONITOR_BUFFER_SIZE > receivedCommandData
const uint16_t IVCAM_MONITOR_MUTEX_TIMEOUT
const uint8_t IV_COMMAND_DEPTH_ACCURACY
const uint8_t PARAMETERS2_BUFFER_SIZE
const uint8_t IVCAM_MONITOR_ENDPOINT_OUT
locked_transfer(std::shared_ptr< platform::command_transfer > command_transfer, uvc_sensor &uvc_ep)
const uint8_t IVCAM_MONITOR_INTERFACE
const uint16_t MAX_SIZE_OF_CALIB_PARAM_BYTES
const uint16_t IVCAM_MONITOR_MAGIC_NUMBER
int sizeOfSendCommandData
const uint8_t IVCAM_MONITOR_ENDPOINT_IN
std::vector< uint8_t > send_receive(const std::vector< uint8_t > &data, int timeout_ms=5000, bool require_response=true)
small_heap< int, 256 > _heap
std::vector< uint8_t > data
const uint16_t SIZE_OF_CALIB_PARAM_BYTES
const uint8_t SIZE_OF_CALIB_HEADER_BYTES
const uint8_t IV_COMMAND_INTENSITY_IMAGE_TYPE
const uint8_t IV_COMMAND_FIRMWARE_UPDATE_MODE
const uint8_t NUM_OF_CALIBRATION_COEFFS
std::string hwmon_error_string(command const &cmd, hwmon_response e)
const uint8_t IV_COMMAND_VERSION
const std::map< hwmon_response, std::string > hwmon_response_report
std::array< uint8_t, 4 > receivedOpcode
const uint16_t HW_MONITOR_COMMAND_SIZE
const uint8_t IV_COMMAND_POWER_GEAR
command(uint8_t cmd, int param1=0, int param2=0, int param3=0, int param4=0, int timeout_ms=5000, bool require_response=true)
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
const uint8_t IV_COMMAND_CONFIDENCE_THRESHHOLD
const uint8_t IV_COMMAND_LOW_CONFIDENCE_LEVEL
const uint16_t SIZE_OF_HW_MONITOR_HEADER
GLenum GLuint GLenum GLsizei length
T get_gvd_field(const std::vector< uint8_t > &data, size_t index)
const uint8_t NUM_OF_CALIBRATION_PARAMS
const uint8_t IV_COMMAND_LASER_POWER
std::array< uint8_t, HW_MONITOR_BUFFER_SIZE > sendCommandData
const uint16_t HW_MONITOR_BUFFER_SIZE
const uint8_t IV_COMMAND_ZUNIT
int sizeOfSendCommandData
const uint16_t IVCAM_MONITOR_MAX_BUFFER_SIZE
hw_monitor(std::shared_ptr< locked_transfer > locked_transfer)
const uint8_t IV_COMMAND_MOTION_VS_RANGE_TRADE
void copy(void *dst, void const *src, size_t size)
std::recursive_mutex _local_mtx
std::string to_string(T value)