DvsenseDriver  1.0.3
The SDK for dvsense products.
载入中...
搜索中...
未找到
RawEventStreamFormat.hpp
1#ifndef __RAW_EVENT_STREAM_FORMAT_HPP__
2#define __RAW_EVENT_STREAM_FORMAT_HPP__
3
4#include <cstdint>
5#include <memory>
6#include <string>
7#include <string_view>
8#include <sstream>
9#include <map>
10
11#ifdef _WIN32
12 #ifdef DVSENSE_HAL_EXPORTS
13 #define DVSENSE_API __declspec(dllexport)
14 #else
15 #define DVSENSE_API __declspec(dllimport)
16 #endif
17#else
18#define DVSENSE_API
19#endif // _WIN32
20
21namespace dvsense
22{
23
27 #ifdef _WIN32
28 enum class DVSENSE_API RawEventStreamEncodingType
29 #else
31 #endif // _WIN32
32 {
36 EVT3 = 0,
37
41 UNKNOWN = -1
42 };
43
47 class DVSENSE_API RawEventStreamFormat
48 {
49 public:
55 RawEventStreamFormat(std::string format);
56
62 std::string getEncodingTypeStr() const;
63
70
78 bool contains(const std::string &name) const;
79
87 const std::string &operator[](const std::string_view name) const;
88
89 private:
95 void parseEncodingType(const std::string &encodingTypeStr);
96
101 std::string encodingTypeStr;
106 RawEventStreamEncodingType encodingType;
111 std::map<std::string, std::string> options;
112 };
113
114} // namespace dvsense
115
116#endif // __RAW_EVENT_STREAM_FORMAT_HPP__
描述直接从相机读取的原始事件流格式和几何形状的类,在解码之前
定义 RawEventStreamFormat.hpp:48
RawEventStreamEncodingType getEncodingType() const
获取编码类型
const std::string & operator[](const std::string_view name) const
访问格式选项,如宽度、高度等
RawEventStreamFormat(std::string format)
从相机读取的字符串构造 RawEventStreamFormat 实例
bool contains(const std::string &name) const
检查格式是否包含特定选项
std::string getEncodingTypeStr() const
获取编码类型为字符串形式
定义 TypeUtils.hpp:7
RawEventStreamEncodingType
原始事件流编码类型的枚举
定义 RawEventStreamFormat.hpp:32