libvisiontransfer  10.5.0
standardparameterids.h
1 /*******************************************************************************
2  * Copyright (c) 2022 Nerian Vision GmbH
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *******************************************************************************/
14 
15 #ifndef VISIONTRANSFER_STANDARDRAMETERIDS_H
16 #define VISIONTRANSFER_STANDARDRAMETERIDS_H
17 
18 #include <map>
19 #include <string>
20 
21 #include <stdint.h>
22 
23 #include <visiontransfer/parameterinfo.h>
24 
25 namespace visiontransfer {
26 namespace internal {
27 
36 class StandardParameterIDs {
37 public:
38 
39  enum ParameterID {
40  // Reserved
41  UNDEFINED = 0x0000,
42 
43  // Processing settings
44  OPERATION_MODE = 0x0100,
45  NUMBER_OF_DISPARITIES = 0x0101, // Not available yet
46  DISPARITY_OFFSET = 0x0102,
47  MAX_NUMBER_OF_IMAGES = 0x0103,
48 
49  // Algorithmic settings
50  SGM_P1_EDGE = 0x0200,
51  SGM_P2_EDGE = 0x0201,
52  MASK_BORDER_PIXELS_ENABLED = 0x0202,
53  CONSISTENCY_CHECK_ENABLED = 0x0203,
54  CONSISTENCY_CHECK_SENSITIVITY = 0x0204,
55  UNIQUENESS_CHECK_ENABLED = 0x0205,
56  UNIQUENESS_CHECK_SENSITIVITY = 0x0206,
57  TEXTURE_FILTER_ENABLED = 0x0207,
58  TEXTURE_FILTER_SENSITIVITY = 0x0208,
59  GAP_INTERPOLATION_ENABLED = 0x0209,
60  NOISE_REDUCTION_ENABLED = 0x020a,
61  SPECKLE_FILTER_ITERATIONS = 0x020b,
62  SGM_P1_NO_EDGE = 0x020c,
63  SGM_P2_NO_EDGE = 0x020d,
64  SGM_EDGE_SENSITIVITY = 0x020e,
65  SUBPIXEL_OPTIMIZATION_ROI_ENABLED = 0x020f,
66  SUBPIXEL_OPTIMIZATION_ROI_X = 0x0210,
67  SUBPIXEL_OPTIMIZATION_ROI_Y = 0x0211,
68  SUBPIXEL_OPTIMIZATION_ROI_WIDTH = 0x0212,
69  SUBPIXEL_OPTIMIZATION_ROI_HEIGHT = 0x0213,
70 
71  // Exposure settings
72  AUTO_EXPOSURE_MODE = 0x0300,
73  AUTO_TARGET_INTENSITY = 0x0301,
74  AUTO_INTENSITY_DELTA = 0x0302,
75  AUTO_TARGET_FRAME = 0x0303,
76  AUTO_SKIPPED_FRAMES = 0x0304,
77  AUTO_MAXIMUM_EXPOSURE_TIME = 0x0305,
78  AUTO_MAXIMUM_GAIN = 0x0306,
79  MANUAL_EXPOSURE_TIME = 0x0307,
80  MANUAL_GAIN = 0x0308,
81  AUTO_EXPOSURE_ROI_ENABLED = 0x0309,
82  AUTO_EXPOSURE_ROI_X = 0x030a,
83  AUTO_EXPOSURE_ROI_Y = 0x030b,
84  AUTO_EXPOSURE_ROI_WIDTH = 0x030c,
85  AUTO_EXPOSURE_ROI_HEIGHT = 0x030d,
86 
87  // Trigger / Pairing
88  MAX_FRAME_TIME_DIFFERENCE_MS = 0x0400,
89  TRIGGER_FREQUENCY = 0x0401,
90  TRIGGER_0_ENABLED = 0x0402,
91  TRIGGER_0_PULSE_WIDTH = 0x0403,
92  TRIGGER_1_ENABLED = 0x0404,
93  TRIGGER_1_PULSE_WIDTH = 0x0405,
94  TRIGGER_1_OFFSET = 0x0406,
95  TRIGGER_0B_PULSE_WIDTH = 0x0407,
96  TRIGGER_0C_PULSE_WIDTH = 0x0408,
97  TRIGGER_0D_PULSE_WIDTH = 0x0409,
98  TRIGGER_1B_PULSE_WIDTH = 0x040a,
99  TRIGGER_1C_PULSE_WIDTH = 0x040b,
100  TRIGGER_1D_PULSE_WIDTH = 0x040c,
101  TRIGGER_0_POLARITY = 0x040d,
102  TRIGGER_1_POLARITY = 0x040e,
103  TRIGGER_0E_PULSE_WIDTH = 0x040f,
104  TRIGGER_0F_PULSE_WIDTH = 0x0410,
105  TRIGGER_0G_PULSE_WIDTH = 0x0411,
106  TRIGGER_0H_PULSE_WIDTH = 0x0412,
107  TRIGGER_1E_PULSE_WIDTH = 0x0413,
108  TRIGGER_1F_PULSE_WIDTH = 0x0414,
109  TRIGGER_1G_PULSE_WIDTH = 0x0415,
110  TRIGGER_1H_PULSE_WIDTH = 0x0416,
111  TRIGGER_0_CONSTANT = 0x0417,
112  TRIGGER_1_CONSTANT = 0x0418,
113  TRIGGER_INPUT = 0x0419,
114 
115  // Auto Re-calibration
116  AUTO_RECALIBRATION_ENABLED = 0x0500,
117  AUTO_RECALIBRATION_PERMANENT = 0x0501,
118 
119  // System settings
120  REBOOT = 0x0600,
121  PPS_SYNC = 0x0601
122  };
123 
124  enum ParameterFlags {
125  // bit flags
126  PARAMETER_WRITEABLE = 0x0001,
127  };
128 
129  // String representations for all ParameterIDs. They correspond
130  // to a lowercase version, OPERATION_MODE <-> "operation_mode";
131  // contents initialized C++11 style over in the source file
132  static const std::map<ParameterID, std::string> parameterNameByID;
133 
134  // Obtain the ParameterID for a parameter name, or UNDEFINED if invalid
135  static ParameterID getParameterIDForName(const std::string& name);
136 
137 };
138 
139 }} // namespace
140 
141 #endif
visiontransfer::internal::StandardParameterIDs::getParameterIDForName
static ParameterID getParameterIDForName(const std::string &name)
Return the ID for a string configuration key (reverse lookup), or UNDEFINED if unknown.
Definition: standardparameterids.cpp:7
Nerian Vision Technologies