Go to the documentation of this file.
43 const std::vector<T>& list2,
46 if (list1.size() != list2.size())
49 for (
auto dev1 : list1)
52 for (
auto dev2 : list2)
83 control_range(std::vector<uint8_t> in_min, std::vector<uint8_t> in_max, std::vector<uint8_t> in_step, std::vector<uint8_t> in_def)
87 std::vector<uint8_t>
min;
88 std::vector<uint8_t>
max;
90 std::vector<uint8_t>
def;
141 return (
a.width ==
b.width) &&
142 (
a.height ==
b.height) &&
144 (
a.format ==
b.format);
147 #pragma pack(push, 1)
200 operator std::string()
204 "\nvid- " << std::hex <<
vid <<
205 "\npid- " << std::hex <<
pid <<
206 "\nmi- " << std::dec <<
mi <<
218 return (std::make_tuple(
id,
vid,
pid,
mi,
unique_id,
device_path) < std::make_tuple(obj.
id, obj.
vid, obj.
pid, obj.
mi, obj.
unique_id, obj.
device_path));
226 return (
a.vid ==
b.vid) &&
229 (
a.unique_id ==
b.unique_id) &&
231 (
a.device_path ==
b.device_path) &&
232 (
a.conn_spec ==
b.conn_spec);
238 return (
a.id ==
b.id) &&
242 (
a.unique_id ==
b.unique_id) &&
243 (
a.conn_spec ==
b.conn_spec);
252 operator std::string()
261 return (
a.file_path ==
b.file_path);
268 operator std::string()
const
270 std::ostringstream oss;
279 return (
a.device_ptr ==
b.device_ptr);
321 #pragma pack(push, 1)
341 virtual void register_profiles(
const std::vector<hid_profile>& hid_profiles) = 0;
342 virtual void open(
const std::vector<hid_profile>& hid_profiles) = 0;
343 virtual void close() = 0;
348 const std::string& report_name,
352 struct request_mapping;
375 virtual std::vector<stream_profile>
get_profiles()
const = 0;
377 virtual void lock()
const = 0;
378 virtual void unlock()
const = 0;
402 _dev->stream_on(error_handler);
407 _dev->start_callbacks();
412 _dev->stop_callbacks();
427 return _dev->get_power_state();
439 if (
_dev->set_xu(xu, ctrl,
data, len))
451 if (
_dev->get_xu(xu, ctrl,
data, len))
461 return _dev->get_xu_range(xu, ctrl, len);
490 return _dev->get_pu_range(opt);
495 return _dev->get_profiles();
500 return _dev->get_device_location();
505 return _dev->get_usb_specification();
512 std::shared_ptr<uvc_device>
_dev;
545 operator std::string()
602 std::string empty_str;
613 void open(
const std::vector<hid_profile>& sensor_iio)
override
615 for (
auto&&
dev :
_dev)
dev->open(sensor_iio);
625 _dev.front()->stop_capture();
635 return _dev.front()->get_sensors();
644 const std::string& report_name,
647 return _dev.front()->get_custom_report_data(custom_sensor_name, report_name, report_field);
651 std::vector<std::shared_ptr<hid_device>>
_dev;
674 _dev[elem]->stream_on(error_handler);
681 _dev[elem]->start_callbacks();
689 _dev[elem]->stop_callbacks();
702 for (
auto& elem :
_dev)
704 elem->set_power_state(
state);
710 return _dev.front()->get_power_state();
715 _dev.front()->init_xu(xu);
720 return _dev.front()->set_xu(xu, ctrl,
data, len);
725 return _dev.front()->get_xu(xu, ctrl,
data, len);
730 return _dev.front()->get_xu_range(xu, ctrl, len);
745 return _dev.front()->get_pu_range(opt);
750 std::vector<stream_profile> all_stream_profiles;
751 for (
auto& elem :
_dev)
753 auto pin_stream_profiles = elem->get_profiles();
754 all_stream_profiles.insert(all_stream_profiles.end(),
755 pin_stream_profiles.begin(), pin_stream_profiles.end());
757 return all_stream_profiles;
762 return _dev.front()->get_device_location();
767 return _dev.front()->get_usb_specification();
772 std::vector<uvc_device*> locked_dev;
774 for (
auto& elem :
_dev)
777 locked_dev.push_back(elem.get());
782 for (
auto& elem : locked_dev)
792 for (
auto& elem :
_dev)
802 for (
auto& elem :
_dev)
804 auto pin_stream_profiles = elem->get_profiles();
805 auto it =
find(pin_stream_profiles.begin(), pin_stream_profiles.end(),
profile);
806 if (
it != pin_stream_profiles.end())
812 throw std::runtime_error(
"profile not found");
815 std::vector<std::shared_ptr<uvc_device>>
_dev;
827 virtual void stop() = 0;
GLint GLint GLsizei GLint GLenum format
bool list_changed(const std::vector< T > &list1, const std::vector< T > &list2, std::function< bool(T, T)> equal=[](T first, T second) { return first==second;})
GLboolean GLboolean GLboolean b
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
const uint8_t MAX_META_DATA_SIZE
const uint16_t MAX_RETRIES
def info(name, value, persistent=False)
const int DISCONNECT_PERIOD_MS
const uint16_t DELAY_FOR_RETRIES
Exposes RealSense structs.
GLint GLsizei GLsizei height
Exposes sensor options functionality for C compilers.
unsigned __int64 uint64_t
double monotonic_to_realtime(double monotonic)
GLboolean GLboolean GLboolean GLboolean a
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls,...
const uint8_t DEFAULT_V4L2_FRAME_BUFFERS
const int POLLING_DEVICES_INTERVAL_MS
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:13:13