nx_server_plugin_sdk  1.0
Server Plugin SDK
device_agent_settings_model.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <string>
6 
7 namespace nx {
8 namespace vms_server_plugins {
9 namespace analytics {
10 namespace stub {
11 namespace roi {
12 
13 static const std::string kTestPolygonSettingName = "testPolygon";
14 static const std::string kDeviceAgentSettingsModel = /*suppress newline*/ 1 + R"json(
15 {
16  "type": "Settings",
17  "items":
18  [
19  {
20  "type": "GroupBox",
21  "caption": "Polygons",
22  "items":
23  [
24  {
25  "type": "PolygonFigure",
26  "name": "excludedArea.figure",
27  "caption": "Excluded area",
28  "useLabelField": false,
29  "maxPoints": 8
30  },
31  {
32  "type": "Repeater",
33  "count": 5,
34  "template":
35  {
36  "type": "GroupBox",
37  "caption": "Polygon #",
38  "filledCheckItems": ["polygon#.figure"],
39  "items":
40  [
41  {
42  "type": "PolygonFigure",
43  "name": "polygon#.figure",
44  "minPoints": 4,
45  "maxPoints": 8
46  },
47  {
48  "type": "SpinBox",
49  "name": "polygon#.threshold",
50  "caption": "Level of detection",
51  "defaultValue": 50,
52  "minValue": 1,
53  "maxValue": 100
54  },
55  {
56  "type": "SpinBox",
57  "name": "polygon#.sensitivity",
58  "caption": "Sensitivity",
59  "defaultValue": 80,
60  "minValue": 1,
61  "maxValue": 100
62  },
63  {
64  "type": "SpinBox",
65  "name": "polygon#.minimumDuration",
66  "caption": "Minimum duration (s)",
67  "defaultValue": 0,
68  "minValue": 0,
69  "maxValue": 5
70  }
71  ]
72  }
73  }
74  ]
75  },
76  {
77  "type": "GroupBox",
78  "caption": "Boxes",
79  "items":
80  [
81  {
82  "type": "Repeater",
83  "count": 5,
84  "template":
85  {
86  "type": "GroupBox",
87  "caption": "Box #",
88  "filledCheckItems": ["box#.figure"],
89  "items":
90  [
91  {
92  "type": "BoxFigure",
93  "name": "box#.figure"
94  },
95  {
96  "type": "SpinBox",
97  "name": "box#.threshold",
98  "caption": "Level of detection",
99  "defaultValue": 50,
100  "minValue": 1,
101  "maxValue": 100
102  },
103  {
104  "type": "SpinBox",
105  "name": "box#.sensitivity",
106  "caption": "Sensitivity",
107  "defaultValue": 80,
108  "minValue": 1,
109  "maxValue": 100
110  },
111  {
112  "type": "SpinBox",
113  "name": "box#.minimumDuration",
114  "caption": "Minimum duration (s)",
115  "defaultValue": 0,
116  "minValue": 0,
117  "maxValue": 5
118  }
119  ]
120  }
121  }
122  ]
123  },
124  {
125  "type": "GroupBox",
126  "caption": "Lines",
127  "items":
128  [
129  {
130  "type": "Repeater",
131  "count": 10,
132  "template":
133  {
134  "type": "GroupBox",
135  "caption": "Line #",
136  "filledCheckItems": ["line#.figure"],
137  "items":
138  [
139  {
140  "type": "LineFigure",
141  "name": "line#.figure"
142  },
143  {
144  "type": "CheckBox",
145  "name": "line#.person",
146  "caption": "Person",
147  "defaultValue": false
148  },
149  {
150  "type": "CheckBox",
151  "name": "line#.vehicle",
152  "caption": "Vehicle",
153  "defaultValue": false
154  },
155  {
156  "type": "CheckBox",
157  "name": "line#.crossing",
158  "caption": "Crossing",
159  "defaultValue": false
160  }
161  ]
162  }
163  }
164  ]
165  },
166  {
167  "type": "GroupBox",
168  "caption": "Polyline",
169  "items":
170  [
171  {
172  "type": "Repeater",
173  "count": 10,
174  "template":
175  {
176  "type": "GroupBox",
177  "caption": "Polyline #",
178  "filledCheckItems": ["testPolyLine#.figure"],
179  "items":
180  [
181  {
182  "type": "LineFigure",
183  "name": "testPolyLine#.figure",
184  "caption": "Polyline",
185  "maxPoints": 8
186  }
187  ]
188  }
189  }
190  ]
191  },
192  {
193  "type": "GroupBox",
194  "caption": "Polygon",
195  "items":
196  [
197  {
198  "type": "PolygonFigure",
199  "name": ")json" + kTestPolygonSettingName + R"json(",
200  "caption": "Polygon outside of a repeater",
201  "description": "The points of this polygon are considered as a Integration-side setting",
202  "minPoints": 3,
203  "maxPoints": 8
204  }
205  ]
206  },
207  {
208  "type": "GroupBox",
209  "caption": "Size Constraints",
210  "items":
211  [
212  {
213  "type": "ObjectSizeConstraints",
214  "name": "testSizeConstraints",
215  "caption": "Object size constraints",
216  "description": "Size range an object should fit into to be detected",
217  "defaultValue": {"minimum": [0.1, 0.4], "maximum": [0.2, 0.8]}
218  }
219  ]
220  }
221  ]
222 }
223 )json";
224 
225 } // namespace roi
226 } // namespace stub
227 } // namespace analytics
228 } // namespace vms_server_plugins
229 } // namespace nx
Definition: apple_utils.h:6