nx_metadata_sdk 1.0 Metadata SDK

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 deprecated_object_detection {
12
13 const std::string kGenerateCarsSetting{"generateCars"};
14 const std::string kGenerateTrucksSetting{"generateTrucks"};
15 const std::string kGeneratePedestriansSetting{"generatePedestrians"};
16 const std::string kGenerateHumanFacesSetting{"generateHumanFaces"};
17 const std::string kGenerateBicyclesSetting{"generateBicycles"};
18 const std::string kGenerateStonesSetting{"generateStones"};
19
20 const std::string kGenerateObjectsEveryNFramesSetting{"generateObjectsEveryNFrames"};
21 const std::string kNumberOfObjectsToGenerateSetting{"numberOfObjectsToGenerate"};
22 // TODO: In Stub, consistently use the term BestShot instead of Preview.
23 const std::string kGeneratePreviewPacketSetting{"generatePreviewPacket"};
24 const std::string kPreviewImageFileSetting{"previewImageFile"};
25 const std::string kGeneratePreviewAfterNFramesSetting("generatePreviewAfterNFrames");
26
27 const std::string kAdditionalFrameProcessingDelayMsSetting{"additionalFrameProcessingDelayMs"};
28 const std::string kOverallMetadataDelayMsSetting{"overallMetadataDelayMs"};
29
30 static const std::string kSettingsModelPart1 = /*suppress newline*/ 1 + R"json(
31 {
32 "type": "Settings",
33 "items":
34 [
35 {
36 "type": "GroupBox",
37 "caption": "Stub DeviceAgent settings",
38 "items":
39 [
40 {
41 "type": "GroupBox",
42 "caption": "Object generation settings",
43 "items":
44 [
45 )json";
46
47 static const std::string kStubObjectTypesSettings = R"json(
48 {
49 "type": "CheckBox",
50 "name": ")json" + kGenerateCarsSetting + R"json(",
51 "caption": "Generate cars",
52 "defaultValue": true
53 },
54 {
55 "type": "CheckBox",
56 "name": ")json" + kGenerateTrucksSetting + R"json(",
57 "caption": "Generate trucks",
58 "defaultValue": true
59 },
60 {
61 "type": "CheckBox",
62 "name": ")json" + kGeneratePedestriansSetting + R"json(",
63 "caption": "Generate pedestrians",
64 "defaultValue": true
65 },
66 {
67 "type": "CheckBox",
68 "name": ")json" + kGenerateHumanFacesSetting + R"json(",
69 "caption": "Generate human faces",
70 "defaultValue": true
71 },
72 {
73 "type": "CheckBox",
74 "name": ")json" + kGenerateBicyclesSetting + R"json(",
75 "caption": "Generate bicycles",
76 "defaultValue": true
77 },
78 {
79 "type": "CheckBox",
80 "name": ")json" + kGenerateStonesSetting + R"json(",
81 "caption": "Generate stones",
82 "defaultValue": false
83 },)json";
84
85 static const std::string kSettingsModelPart2 = R"json(
86 {
87 "type": "SpinBox",
88 "name": ")json" + kNumberOfObjectsToGenerateSetting + R"json(",
89 "caption": "Number of objects to generate",
90 "defaultValue": 1,
91 "minValue": 1,
92 "maxValue": 100000
93 },
94 {
95 "type": "SpinBox",
96 "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(",
97 "caption": "Generate objects every N frames",
98 "defaultValue": 1,
99 "minValue": 1,
100 "maxValue": 100000
101 },
102 {
103 "type": "CheckBox",
104 "name": ")json" + kGeneratePreviewPacketSetting + R"json(",
105 "caption": "Generate preview packet",
106 "defaultValue": true
107 },
108 {
109 "type": "TextArea",
110 "name": ")json" + kPreviewImageFileSetting + R"json(",
111 "caption": "Preview image file",
112 "description": "Path to an image which should be used as a preview for tracks"
113 },
114 {
115 "type": "SpinBox",
116 "name": ")json" + kGeneratePreviewAfterNFramesSetting + R"json(",
117 "caption": "Generate preview after N frames",
118 "defaultValue": 30,
119 "minValue": 1,
120 "maxValue": 100000
121 },
122 {
123 "type": "SpinBox",
124 "name": ")json" + kOverallMetadataDelayMsSetting + R"json(",
125 "caption": "Overall metadata delay, ms",
126 "defaultValue": 0,
127 "minValue": 0,
128 "maxValue": 1000000000
129 }
130 ]
131 },
132 {
133 "type": "SpinBox",
134 "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(",
135 "caption": "Additional frame processing delay, ms",
136 "defaultValue": 0,
137 "minValue": 0,
138 "maxValue": 1000000000
139 }
140 ]
141 }
142 ]
143 }
144 )json";
145
146 } // namespace deprecated_object_detection
147 } // namespace stub
148 } // namespace analytics
149 } // namespace vms_server_plugins
150 } // namespace nx
nx
Definition: apple_utils.h:6