DVSenseDriver  1.0.1
The SDK for dvsense products.
CameraTool.h
1 #ifndef CAMERA_TOOL_BASE_HPP
2 #define CAMERA_TOOL_BASE_HPP
3 
4 #include <string>
5 #include "DvsenseHal/camera/tools/ToolInfo.h"
6 
7 #ifdef _WIN32
8 #define DVSENSE_API __declspec(dllexport)
9 #else
10 #define DVSENSE_API
11 #endif // _WIN32
12 
13 namespace dvsense
14 {
15 
21  class DVSENSE_API CameraTool
22  {
23  public:
24  CameraTool(std::string prefix = "") : prefix_(prefix) {}
25 
26  virtual ~CameraTool(){}
27 
35  virtual const ToolInfo getToolInfo() = 0;
36 
44  virtual const std::vector<BasicParameterInfo> getAllParamInfo() = 0;
45 
57  virtual bool getParamInfo(const std::string name, IntParameterInfo &info) = 0;
58  virtual bool getParamInfo(const std::string name, FloatParameterInfo& info) = 0;
59  virtual bool getParamInfo(const std::string name, BoolParameterInfo& info) = 0;
60  virtual bool getParamInfo(const std::string name, EnumParameterInfo& info) = 0;
61 
73  virtual bool getParam(const std::string name, int& value);
74  virtual bool getParam(const std::string name, float& value);
75  virtual bool getParam(const std::string name, bool& value);
76  virtual bool getParam(const std::string name, std::string& value);
88  virtual bool setParam(const std::string name, const int& value);
89  virtual bool setParam(const std::string name, const float& value);
90  virtual bool setParam(const std::string name, const bool& value);
91  virtual bool setParam(const std::string name, const std::string& value);
92 
93  protected:
94  std::string prefix_ = "";
95  };
96 } // namespace dvsense
97 
98 #endif // CAMERA_TOOL_BASE_HPP
相机工具的基类。工具指的是用来控制相机的抽象概念,可以用来设置各种相机参数、获取相机参数信息、进行数据处理等。
Definition: CameraTool.h:22
virtual bool getParamInfo(const std::string name, FloatParameterInfo &info)=0
virtual bool setParam(const std::string name, const int &value)
设置一个参数的值。
virtual bool setParam(const std::string name, const bool &value)
virtual bool getParam(const std::string name, std::string &value)
virtual const ToolInfo getToolInfo()=0
获取工具的信息。
virtual bool getParamInfo(const std::string name, IntParameterInfo &info)=0
获取一个参数的详细信息。
virtual bool getParam(const std::string name, bool &value)
virtual const std::vector< BasicParameterInfo > getAllParamInfo()=0
获取所有参数的基本信息。如果想要获取某个参数的详细信息,请参考 CameraTool::getParamInfo 。
virtual bool getParam(const std::string name, float &value)
virtual bool setParam(const std::string name, const std::string &value)
virtual bool getParam(const std::string name, int &value)
获取一个参数的值。
virtual ~CameraTool()
Definition: CameraTool.h:26
virtual bool getParamInfo(const std::string name, EnumParameterInfo &info)=0
virtual bool setParam(const std::string name, const float &value)
virtual bool getParamInfo(const std::string name, BoolParameterInfo &info)=0
CameraTool(std::string prefix="")
Definition: CameraTool.h:24
Definition: TypeUtils.hpp:7
工具的信息,包括类型、可以更改的参数名称和描述。
Definition: ToolInfo.h:32
布尔参数的详细信息。
Definition: ToolInfo.h:131
枚举参数的详细信息。
Definition: ToolInfo.h:143
浮点数参数的详细信息。
Definition: ToolInfo.h:107
整数参数的详细信息。
Definition: ToolInfo.h:83