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 special_objects {
12 
13 const std::string kGenerateFixedObjectSetting{"generateFixedObject"};
14 const std::string kFixedObjectColorSetting{"fixedObjectColor"};
15 const std::string kNoSpecialColorSettingValue{"No special color"};
16 
17 const std::string kGenerateCounterSetting{"generateCounter"};
18 const std::string kCounterBoundingBoxSideSizeSetting{"counterBoundingBoxSideSize"};
19 const std::string kCounterXOffsetSetting{"counterXOffset"};
20 const std::string kCounterYOffsetSetting{"counterYOffset"};
21 
22 const std::string kBlinkingObjectPeriodMsSetting{"blinkingObjectPeriodMs"};
23 const std::string kBlinkingObjectInDedicatedPacketSetting{"blinkingObjectInDedicatedPacket"};
24 
25 const std::string kGenerateObjectsEveryNFramesSetting{"generateObjectsEveryNFrames"};
26 const std::string kAdditionalFrameProcessingDelayMsSetting{"additionalFrameProcessingDelayMs"};
27 const std::string kOverallMetadataDelayMsSetting{"overallMetadataDelayMs"};
28 
29 static const std::string kSettingsModel = /*suppress newline*/ 1 + R"json(
30 {
31  "type": "Settings",
32  "items":
33  [
34  {
35  "type": "GroupBox",
36  "caption": "Stub DeviceAgent settings",
37  "items":
38  [
39  {
40  "type": "GroupBox",
41  "caption": "Object generation settings",
42  "items":
43  [
44  {
45  "type": "CheckBox",
46  "name": ")json" + kGenerateFixedObjectSetting + R"json(",
47  "caption": "Generate fixed object",
48  "description": "Generates a fixed object with coordinates (0.25, 0.25, 0.25, 0.25)",
49  "defaultValue": false
50  },
51  {
52  "type": "ComboBox",
53  "name": ")json" + kFixedObjectColorSetting + R"json(",
54  "caption": "Fixed object color",
55  "range": [
56  ")json" + kNoSpecialColorSettingValue + R"json(",
57  "Magenta", "Blue", "Green", "Yellow", "Cyan", "Purple", "Orange",
58  "Red", "White", "#FFFFC0", "!invalid!", "#NONHEX"
59  ],
60  "defaultValue": ")json" + kNoSpecialColorSettingValue + R"json("
61  },
62  {
63  "type": "CheckBox",
64  "name": ")json" + kGenerateCounterSetting + R"json(",
65  "caption": "Generate counter",
66  "description": "Generates a counter",
67  "defaultValue": false
68  },
69  {
70  "type": "DoubleSpinBox",
71  "caption": "Size of the side of the counter bounding box",
72  "name": ")json" + kCounterBoundingBoxSideSizeSetting + R"json(",
73  "defaultValue": 0.0,
74  "minValue": 0.0,
75  "maxValue": 1.0
76  },
77  {
78  "type": "DoubleSpinBox",
79  "caption": "Counter bounding box X-Offset",
80  "name": ")json" + kCounterXOffsetSetting + R"json(",
81  "defaultValue": 0.0,
82  "minValue": 0.0,
83  "maxValue": 1.0
84  },
85  {
86  "type": "DoubleSpinBox",
87  "caption": "Counter bounding box Y-Offset",
88  "name": ")json" + kCounterYOffsetSetting + R"json(",
89  "defaultValue": 0.0,
90  "minValue": 0.0,
91  "maxValue": 1.0
92  },
93  {
94  "type": "SpinBox",
95  "name": ")json" + kBlinkingObjectPeriodMsSetting + R"json(",
96  "caption": "Generate 1-frame BlinkingObject every N ms (if not 0)",
97  "defaultValue": 0,
98  "minValue": 0,
99  "maxValue": 100000
100  },
101  {
102  "type": "CheckBox",
103  "name": ")json" + kBlinkingObjectInDedicatedPacketSetting + R"json(",
104  "caption": "Put BlinkingObject into a dedicated MetadataPacket",
105  "defaultValue": false
106  },
107  {
108  "type": "SpinBox",
109  "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(",
110  "caption": "Generate objects every N frames",
111  "defaultValue": 1,
112  "minValue": 1,
113  "maxValue": 100000
114  },
115  {
116  "type": "SpinBox",
117  "name": ")json" + kOverallMetadataDelayMsSetting + R"json(",
118  "caption": "Overall metadata delay, ms",
119  "defaultValue": 0,
120  "minValue": 0,
121  "maxValue": 1000000000
122  }
123  ]
124  },
125  {
126  "type": "SpinBox",
127  "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(",
128  "caption": "Additional frame processing delay, ms",
129  "defaultValue": 0,
130  "minValue": 0,
131  "maxValue": 1000000000
132  }
133  ]
134  }
135  ]
136 }
137 )json";
138 
139 } // namespace special_objects
140 } // namespace stub
141 } // namespace analytics
142 } // namespace vms_server_plugins
143 } // namespace nx
Definition: apple_utils.h:6