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