usb_sensor_enumerator.h
Go to the documentation of this file.
1 /*
2  * BSD 3-Clause License
3  *
4  * Copyright (c) 2019, Analog Devices, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice, this
11  * list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 #ifndef USB_SENSOR_ENUMERATOR_H
33 #define USB_SENSOR_ENUMERATOR_H
34 
36 #include "usb_buffer.pb.h"
37 
39  public:
41 
42  public: // implements SensorEnumeratorInterface
43  virtual aditof::Status searchSensors() override;
44  virtual aditof::Status
45  getDepthSensors(std::vector<std::shared_ptr<aditof::DepthSensorInterface>>
46  &depthSensors) override;
47  virtual aditof::Status
48  getUbootVersion(std::string &uBootVersion) const override;
49  virtual aditof::Status
50  getKernelVersion(std::string &kernelVersion) const override;
51  virtual aditof::Status getSdVersion(std::string &sdVersion) const override;
52 
53  private:
54  struct SensorInfo {
56  };
58 
59  int fd;
60 
61  std::vector<SensorInfo> m_sensorsInfo;
65 };
66 
67 #endif // USB_SENSOR_ENUMERATOR_H
UsbSensorEnumerator::SensorInfo
Definition: usb_sensor_enumerator.h:54
UsbSensorEnumerator::m_kernelVersion
std::string m_kernelVersion
Definition: usb_sensor_enumerator.h:63
UsbSensorEnumerator::getSdVersion
virtual aditof::Status getSdVersion(std::string &sdVersion) const override
Get the SD card image version on the embedded system that the camera is attached to.
Definition: linux/usb_sensor_enumerator.cpp:225
UsbSensorEnumerator::getUbootVersion
virtual aditof::Status getUbootVersion(std::string &uBootVersion) const override
Get the U-Boot version that is installed on the embedded system that the camera is attached to.
Definition: linux/usb_sensor_enumerator.cpp:214
UsbSensorEnumerator::m_sdVersion
std::string m_sdVersion
Definition: usb_sensor_enumerator.h:64
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
UsbSensorEnumerator::fd
int fd
Definition: usb_sensor_enumerator.h:59
UsbSensorEnumerator::~UsbSensorEnumerator
~UsbSensorEnumerator()
UsbSensorEnumerator::SensorInfo::driverPath
std::string driverPath
Definition: usb_sensor_enumerator.h:55
sensor_enumerator_interface.h
UsbSensorEnumerator::getDepthSensors
virtual aditof::Status getDepthSensors(std::vector< std::shared_ptr< aditof::DepthSensorInterface >> &depthSensors) override
Definition: linux/usb_sensor_enumerator.cpp:199
UsbSensorEnumerator
Definition: usb_sensor_enumerator.h:38
aditof::Status
Status
Status of any operation that the TOF sdk performs.
Definition: status_definitions.h:48
UsbSensorEnumerator::searchSensors
virtual aditof::Status searchSensors() override
Do a search for the available sensors.
Definition: linux/usb_sensor_enumerator.cpp:56
aditof::SensorEnumeratorInterface
Can search for sensors and retrieve sensors by category.
Definition: sensor_enumerator_interface.h:47
UsbSensorEnumerator::m_sensorName
std::string m_sensorName
Definition: usb_sensor_enumerator.h:57
UsbSensorEnumerator::m_uBootVersion
std::string m_uBootVersion
Definition: usb_sensor_enumerator.h:62
UsbSensorEnumerator::getKernelVersion
virtual aditof::Status getKernelVersion(std::string &kernelVersion) const override
Get the kernel version that is installed on the embedded system that the camera is attached to.
Definition: linux/usb_sensor_enumerator.cpp:220
UsbSensorEnumerator::m_sensorsInfo
std::vector< SensorInfo > m_sensorsInfo
Definition: usb_sensor_enumerator.h:61


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:01