target_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 TARGET_SENSOR_ENUMERATOR_H
33 #define TARGET_SENSOR_ENUMERATOR_H
34 
37 
39  public:
40  ~TargetSensorEnumerator() = default;
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  std::string getVersionOfComponent(const std::string &component) const;
55 
56  private:
57  enum class SensorType {
59  };
60 
61  struct SensorInfo {
66  };
67 
72  };
73 
74  std::vector<SensorInfo> m_sensorsInfo;
80 };
81 
82 #endif // TARGET_SENSOR_ENUMERATOR_H
TargetSensorEnumerator::m_sensorsInfo
std::vector< SensorInfo > m_sensorsInfo
Definition: target_sensor_enumerator.h:74
TargetSensorEnumerator::SensorInfo::subDevPath
std::string subDevPath
Definition: target_sensor_enumerator.h:64
TargetSensorEnumerator::SensorType::SENSOR_ADSD3500
@ SENSOR_ADSD3500
ADSD3500 sensor.
TargetSensorEnumerator::SensorInfo::captureDev
std::string captureDev
Definition: target_sensor_enumerator.h:65
TargetSensorEnumerator::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: target_sensor_enumerator.cpp:108
TargetSensorEnumerator::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: target_sensor_enumerator.cpp:96
TargetSensorEnumerator::~TargetSensorEnumerator
~TargetSensorEnumerator()=default
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
TargetSensorEnumerator::m_cardImageVersion
std::string m_cardImageVersion
Definition: target_sensor_enumerator.h:75
TargetSensorEnumerator::m_rfsVersion
std::string m_rfsVersion
Definition: target_sensor_enumerator.h:78
TargetSensorEnumerator::m_sdkVersion
std::string m_sdkVersion
Definition: target_sensor_enumerator.h:79
sensor_enumerator_interface.h
TargetSensorEnumerator::SoftwareVersions::cardVersion
std::string cardVersion
Definition: target_sensor_enumerator.h:69
TargetSensorEnumerator::getVersionOfComponent
std::string getVersionOfComponent(const std::string &component) const
Definition: target_sensor_enumerator.cpp:69
TargetSensorEnumerator
Definition: target_sensor_enumerator.h:38
TargetSensorEnumerator::SoftwareVersions::kernelVersion
std::string kernelVersion
Definition: target_sensor_enumerator.h:70
TargetSensorEnumerator::SensorInfo::sensorType
SensorType sensorType
Definition: target_sensor_enumerator.h:62
TargetSensorEnumerator::SensorInfo::driverPath
std::string driverPath
Definition: target_sensor_enumerator.h:63
TargetSensorEnumerator::m_kernelVersion
std::string m_kernelVersion
Definition: target_sensor_enumerator.h:77
aditof::Status
Status
Status of any operation that the TOF sdk performs.
Definition: status_definitions.h:48
TargetSensorEnumerator::getDepthSensors
virtual aditof::Status getDepthSensors(std::vector< std::shared_ptr< aditof::DepthSensorInterface >> &depthSensors) override
Definition: target_sensor_enumerator.cpp:46
aditof::SensorEnumeratorInterface
Can search for sensors and retrieve sensors by category.
Definition: sensor_enumerator_interface.h:47
TargetSensorEnumerator::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: target_sensor_enumerator.cpp:120
TargetSensorEnumerator::SensorInfo
Definition: target_sensor_enumerator.h:61
sensor_definitions.h
TargetSensorEnumerator::SoftwareVersions::uBootVersion
std::string uBootVersion
Definition: target_sensor_enumerator.h:71
TargetSensorEnumerator::searchSensors
virtual aditof::Status searchSensors() override
Do a search for the available sensors.
Definition: sensor_enumerator_imx.cpp:106
TargetSensorEnumerator::m_uBootVersion
std::string m_uBootVersion
Definition: target_sensor_enumerator.h:76
TargetSensorEnumerator::SoftwareVersions
Definition: target_sensor_enumerator.h:68
TargetSensorEnumerator::SensorType
SensorType
Definition: target_sensor_enumerator.h:57


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:59