DvsenseDriver  1.0.3
The SDK for dvsense products.
Loading...
Searching...
No Matches
CameraTool.h
1#ifndef CAMERA_TOOL_BASE_HPP
2#define CAMERA_TOOL_BASE_HPP
3
4#include <string>
5#include <map>
6#include <map>
7#include "DvsenseHal/camera/tools/ToolInfo.h"
8
9#ifdef _WIN32
10 #ifdef DVSENSE_HAL_EXPORTS
11 #define DVSENSE_API __declspec(dllexport)
12 #else
13 #define DVSENSE_API __declspec(dllimport)
14 #endif
15#else
16#define DVSENSE_API
17#endif // _WIN32
18
19namespace dvsense
20{
21
27 class DVSENSE_API CameraTool
28 {
29 public:
30 CameraTool(std::string prefix = "") : prefix_(prefix) {}
31
32 virtual ~CameraTool(){}
33
41 virtual const ToolInfo getToolInfo() = 0;
42
50 virtual std::map<std::string, BasicParameterInfo> getAllParamInfo() = 0;
51
63 virtual bool getParamInfo(const std::string name, IntParameterInfo &info) = 0;
64 virtual bool getParamInfo(const std::string name, FloatParameterInfo& info) = 0;
65 virtual bool getParamInfo(const std::string name, BoolParameterInfo& info) = 0;
66 virtual bool getParamInfo(const std::string name, EnumParameterInfo& info) = 0;
67
79 virtual bool getParam(const std::string name, int& value);
80 virtual bool getParam(const std::string name, float& value);
81 virtual bool getParam(const std::string name, bool& value);
82 virtual bool getParam(const std::string name, std::string& value);
94 virtual bool setParam(const std::string name, const int& value);
95 virtual bool setParam(const std::string name, const float& value);
96 virtual bool setParam(const std::string name, const double& value);
97 virtual bool setParam(const std::string name, const bool& value);
98 virtual bool setParam(const std::string name, const char* value);
99 virtual bool setParam(const std::string name, const std::string& value);
100
101 protected:
102 std::string prefix_ = "";
103 };
104} // namespace dvsense
105
106#endif // CAMERA_TOOL_BASE_HPP
The base class of camera tools. Tools refer to the abstract concept used to control the camera,...
Definition CameraTool.h:28
virtual bool getParamInfo(const std::string name, FloatParameterInfo &info)=0
virtual bool setParam(const std::string name, const int &value)
Set the value of a parameter.
virtual bool setParam(const std::string name, const bool &value)
virtual bool getParam(const std::string name, std::string &value)
virtual std::map< std::string, BasicParameterInfo > getAllParamInfo()=0
Get the basic information of all parameters. If you want to get the detailed information of a paramet...
virtual const ToolInfo getToolInfo()=0
Get the information of the tool.
virtual bool getParamInfo(const std::string name, IntParameterInfo &info)=0
Get the detailed information of a parameter.
virtual bool getParam(const std::string name, bool &value)
virtual bool getParam(const std::string name, float &value)
virtual bool setParam(const std::string name, const double &value)
virtual bool setParam(const std::string name, const std::string &value)
virtual bool getParam(const std::string name, int &value)
Get the value of a parameter.
virtual bool setParam(const std::string name, const char *value)
virtual ~CameraTool()
Definition CameraTool.h:32
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:30
Definition TypeUtils.hpp:7
The information of the tool, including the type, the parameter names and the description.
Definition ToolInfo.h:45
The detailed information of the boolean parameter.
Definition ToolInfo.h:148
The detailed information of the enumeration parameter.
Definition ToolInfo.h:162
The detailed information of the float parameter.
Definition ToolInfo.h:122
The detailed information of the integer parameter.
Definition ToolInfo.h:96