Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
win-hid.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 #pragma once
4 
5 #include "../backend.h"
6 #include "win-helpers.h"
7 
8 #include <Sensorsapi.h>
9 #include <atlcomcli.h>
10 
11 namespace librealsense
12 {
13  namespace platform
14  {
15  class wmf_hid_device : public hid_device
16  {
17  public:
18  static void foreach_hid_device(std::function<void(hid_device_info, CComPtr<ISensor>)> action);
19 
20  explicit wmf_hid_device(CComPtr<ISensor> sensor) : _sensor(sensor) {}
21 
22  void open(const std::vector<hid_profile>&iio_profiles) override;
23  void close() override;
24  void stop_capture() override;
25  void start_capture(hid_callback callback) override;
26  std::vector<hid_sensor> get_sensors() override;
27  std::vector<uint8_t> get_custom_report_data(const std::string& custom_sensor_name,
28  const std::string& report_name,
29  custom_sensor_report_field report_field) override;
30 
31  private:
32  CComPtr<ISensor> _sensor = nullptr;
33  CComPtr<ISensorEvents> _cb = nullptr;
34  };
35  }
36 }
wmf_hid_device(CComPtr< ISensor > sensor)
Definition: win-hid.h:20
std::vector< hid_sensor > get_sensors() override
Definition: backend.h:397
std::vector< uint8_t > get_custom_report_data(const std::string &custom_sensor_name, const std::string &report_name, custom_sensor_report_field report_field) override
static void foreach_hid_device(std::function< void(hid_device_info, CComPtr< ISensor >)> action)
Definition: algo.h:16
void start_capture(hid_callback callback) override
custom_sensor_report_field
Definition: backend.h:373
void open(const std::vector< hid_profile > &iio_profiles) override
std::function< void(const sensor_data &)> hid_callback
Definition: backend.h:395