8 namespace vms_server_plugins {
12 const std::string kEnginePluginSideSetting{
"testPluginSideSpinBox"};
14 const std::string kGenerateEventsSetting{
"generateEvents"};
15 const std::string kMotionVisualizationObjectType{
"nx.stub.motionVisualization"};
17 const std::string kGenerateCarsSetting{
"generateCars"};
18 const std::string kGenerateTrucksSetting{
"generateTrucks"};
19 const std::string kGeneratePedestriansSetting{
"generatePedestrians"};
20 const std::string kGenerateHumanFacesSetting{
"generateHumanFaces"};
21 const std::string kGenerateBicyclesSetting{
"generateBicycles"};
22 const std::string kGenerateStonesSetting{
"generateStones"};
23 const std::string kGenerateFixedObjectSetting{
"generateFixedObject"};
24 const std::string kGenerateCounterSetting{
"generateCounter"};
25 const std::string kCounterBoundingBoxSideSizeSetting{
"counterBoundingBoxSideSize"};
26 const std::string kCounterXOffsetSetting{
"counterXOffset"};
27 const std::string kCounterYOffsetSetting{
"counterYOffset"};
29 const std::string kDeclareAdditionalEventTypesSetting{
"declareAdditionalEventTypesSetting"};
31 const std::string kBlinkingObjectPeriodMsSetting{
"blinkingObjectPeriodMs"};
32 const std::string kBlinkingObjectInDedicatedPacketSetting{
"blinkingObjectInDedicatedPacket"};
34 const std::string kGenerateObjectsEveryNFramesSetting{
"generateObjectsEveryNFrames"};
35 const std::string kNumberOfObjectsToGenerateSetting{
"numberOfObjectsToGenerate"};
36 const std::string kGeneratePreviewPacketSetting{
"generatePreviewPacket"};
37 const std::string kGeneratePreviewAfterNFramesSetting(
"generatePreviewAfterNFrames");
38 const std::string kThrowPluginDiagnosticEventsFromDeviceAgentSetting{
39 "throwPluginDiagnosticEventsFromDeviceAgent"};
41 const std::string kThrowPluginDiagnosticEventsFromEngineSetting{
42 "throwPluginDiagnosticEventsFromDeviceAgent"};
43 const std::string kDisableStreamSelectionSetting{
"disableStreamSelection"};
44 const std::string kLeakFramesSetting{
"leakFrames"};
45 const std::string kAdditionalFrameProcessingDelayMsSetting{
"additionalFrameProcessingDelayMs"};
46 const std::string kOverallMetadataDelayMsSetting{
"overallMetadataDelayMs"};
48 static const std::string kRegularSettingsModelOption =
"regular";
49 static const std::string kAlternativeSettingsModelOption =
"alternative";
51 static const std::string kSettingsModelSettings =
"settingsModelComboBox";
53 static const std::string kCitySelector =
"languageSelectorSettings";
54 static const std::string kEnglishOption =
"English";
55 static const std::string kGermanOption =
"German";
57 static const std::string kAlternativeSettingsModel =
58 1 + (
const char*) R
"json(" 64 "name": ")json" + kSettingsModelSettings + R"json(", 65 "caption": "Settings model", 66 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 68 ")json" + kRegularSettingsModelOption + R"json(", 69 ")json" + kAlternativeSettingsModelOption + R"json(" 74 "caption": "Alternative GroupBox", 78 "name": "alternativeCheckBox", 79 "caption": "Alternative CheckBox", 84 "name": "alternativeTextField", 85 "caption": "Alternative TextField", 86 "defaultValue": "alternative text" 93 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 99 "name": ")json" + kSettingsModelSettings + R"json(", 100 "caption": "Settings model", 101 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 103 ")json" + kRegularSettingsModelOption + R"json(", 104 ")json" + kAlternativeSettingsModelOption + R"json(" 109 "caption": "Real Stub DeviceAgent settings", 113 "caption": "Object generation settings", 117 "name": ")json" + kGenerateCarsSetting + R"json(", 118 "caption": "Generate cars", 123 "name": ")json" + kGenerateTrucksSetting + R"json(", 124 "caption": "Generate trucks", 129 "name": ")json" + kGeneratePedestriansSetting + R"json(", 130 "caption": "Generate pedestrians", 135 "name": ")json" + kGenerateHumanFacesSetting + R"json(", 136 "caption": "Generate human faces", 141 "name": ")json" + kGenerateBicyclesSetting + R"json(", 142 "caption": "Generate bicycles", 147 "name": ")json" + kGenerateStonesSetting + R"json(", 148 "caption": "Generate stones", 149 "defaultValue": false 153 "name": ")json" + kGenerateFixedObjectSetting + R"json(", 154 "caption": "Generate fixed object", 155 "description": "Generates a fixed object with coordinates (0.25, 0.25, 0.25, 0.25)", 156 "defaultValue": false 160 "name": ")json" + kGenerateCounterSetting + R"json(", 161 "caption": "Generate counter", 162 "description": "Generates a counter", 163 "defaultValue": false 166 "type": "DoubleSpinBox", 167 "caption": "Size of the side of the counter bounding box", 168 "name": ")json" + kCounterBoundingBoxSideSizeSetting + R"json(", 174 "type": "DoubleSpinBox", 175 "caption": "Counter bounding box X-Offset", 176 "name": ")json" + kCounterXOffsetSetting + R"json(", 182 "type": "DoubleSpinBox", 183 "caption": "Counter bounding box Y-Offset", 184 "name": ")json" + kCounterYOffsetSetting + R"json(", 191 "caption": "Declare additional event types", 192 "name": ")json" + kDeclareAdditionalEventTypesSetting + R"json(", 193 "defaultValue": false 197 "name": ")json" + kBlinkingObjectPeriodMsSetting + R"json(", 198 "caption": "Generate 1-frame BlinkingObject every N ms (if not 0)", 205 "name": ")json" + kBlinkingObjectInDedicatedPacketSetting + R"json(", 206 "caption": "Put BlinkingObject into a dedicated MetadataPacket", 207 "defaultValue": false 211 "name": ")json" + kNumberOfObjectsToGenerateSetting + R"json(", 212 "caption": "Number of objects to generate", 219 "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(", 220 "caption": "Generate objects every N frames", 227 "name": ")json" + kGeneratePreviewPacketSetting + R"json(", 228 "caption": "Generate preview packet", 233 "name": ")json" + kGeneratePreviewAfterNFramesSetting + R"json(", 234 "caption": "Generate preview after N frames", 241 "name": ")json" + kOverallMetadataDelayMsSetting + R"json(", 242 "caption": "Overall metadata delay, ms", 245 "maxValue": 1000000000 251 "name": ")json" + kGenerateEventsSetting + R"json(", 252 "caption": "Generate events", 257 "name": ")json" + kThrowPluginDiagnosticEventsFromDeviceAgentSetting + R"json(", 258 "caption": "Produce Plugin Diagnostic Events from the DeviceAgent", 259 "defaultValue": false 263 "name": ")json" + kLeakFramesSetting + R"json(", 264 "caption": "Force a memory leak when processing a video frame", 265 "defaultValue": false 269 "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(", 270 "caption": "Additional frame processing delay, ms", 273 "maxValue": 1000000000 279 "caption": "Example Stub DeviceAgent settings", 283 "name": "testTextField", 284 "caption": "Device Agent Text Field", 285 "description": "A text field", 286 "defaultValue": "a text" 290 "name": ")json" + kCitySelector + R"json(", 292 "defaultValue": "English", 294 ")json" + kEnglishOption + R"json(", 295 ")json" + kGermanOption + R"json(" 299 static const std::string kEnglishCitiesPart = 1 + R
"json( 301 "type": "RadioButtonGroup", 302 "name": "testEnglishRadioButtonGroup", 303 "caption": "Choose one", 304 "description": "Choose one option", 305 "defaultValue": "London", 312 static const std::string kGermanCitiesPart = 1 + R
"json( 314 "type": "RadioButtonGroup", 315 "name": "testGermanRadioButtonGroup", 316 "caption": "Choose one", 317 "description": "Choose one option", 318 "defaultValue": "Berlin", 326 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 328 "type": "RadioButtonGroup", 329 "name": "testRadioButtonGroup", 330 "caption": "RadioButton Group", 331 "description": "Choose one option", 332 "defaultValue": "Cs_enodatum", 345 "K_gowerianus": "Kepplerites gowerianus", 346 "K_galilaeii": "Kepplerites galilaeii", 347 "S_calloviense": "Sigaloceras calloviense", 348 "S_micans": "Sigaloceras micans", 349 "Cs_enodatum": "Catasigaloceras enodatum", 350 "K_medea": "Kosmoceras medea", 351 "K_jason": "Kosmoceras jason", 352 "K_obductum": "Kosmoceras obductum", 353 "K_posterior": "Kosmoceras posterior" 357 "type": "CheckBoxGroup", 358 "name": "testCheckBoxGroup", 359 "caption": "CheckBox Group", 360 "description": "Choose one or several options", 361 "defaultValue": ["Coleoidea", "Nautiloidea"], 369 "Coleoidea": "Coleoidea (Bather, 1888)", 370 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 371 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 372 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 377 "caption": "Device Agent SpinBox (plugin side)", 378 "name": "pluginSideTestSpinBox", 384 "type": "DoubleSpinBox", 385 "caption": "Device Agent DoubleSpinBox", 386 "name": "testDoubleSpinBox", 387 "defaultValue": 3.1415, 393 "name": "testComboBox", 394 "caption": "Device Agent ComboBox", 395 "defaultValue": "value2", 396 "range": ["value1", "value2", "value3"], 398 "value1": "Device Agent Value #1", 399 "value2": "Device Agent Value #2", 400 "value3": "Device Agent Value #3" 408 "caption": "Device Agent CheckBox", 409 "name": "testCheckBox", 414 "caption": "Disabled Device Agent CheckBox", 415 "name": "disabledTestCheckBox", 416 "defaultValue": false, 421 "caption": "Hidden Device Agent CheckBox", 422 "name": "hiddenTestCheckBox", 423 "defaultValue": false, 432 "caption": "Example", 436 "caption": "Example Stub DeviceAgent settings", 440 "name": "testTextFieldWithValidation", 441 "caption": "Hexadecimal number text field", 442 "defaultValue": "12ab34cd", 443 "validationRegex": "^[a-f0-9]+$", 444 "validationRegexFlags": "i", 445 "validationErrorMessage": "Text must contain only digits and characters a-f, e.g. 12ab34cd." 449 "caption": "Device Agent SpinBox (plugin side)", 450 "name": "pluginSideTestSpinBox2", 456 "type": "DoubleSpinBox", 457 "caption": "Device Agent DoubleSpinBox", 458 "name": "testDoubleSpinBox2", 459 "defaultValue": 3.1415, 465 "name": "testComboBox2", 466 "caption": "Device Agent ComboBox", 467 "defaultValue": "value2", 468 "range": ["value1", "value2", "value3"] 472 "caption": "Device Agent CheckBox", 473 "name": "testCheckBox2", 482 "caption": "Nested section", 486 "caption": "Nested Section Example", 489 "type": "SwitchButton", 490 "caption": "Switch Button", 491 "name": "testSwitch", 492 "description": "Tooltip for the switch button", 493 "defaultValue": false 497 "caption": "SpinBox Parameter", 498 "name": "testSpinBox3", 504 "type": "DoubleSpinBox", 505 "caption": "DoubleSpinBox Parameter", 506 "name": "testDoubleSpinBox3", 507 "defaultValue": 3.1415, 513 "name": "testComboBox3", 514 "caption": "ComboBox Parameter", 515 "defaultValue": "value2", 516 "range": ["value1", "value2", "value3"] 520 "caption": "CheckBox Parameter", 521 "name": "testCheckBox3", 536 "caption": "Polygons", 543 "caption": "Polygon #", 544 "filledCheckItems": ["polygon#.figure"], 547 "type": "PolygonFigure", 548 "name": "polygon#.figure", 554 "name": "polygon#.threshold", 555 "caption": "Level of detection", 562 "name": "polygon#.sensitivity", 563 "caption": "Sensitivity", 570 "name": "polygon#.minimumDuration", 571 "caption": "Minimum duration (s)", 591 "filledCheckItems": ["box#.figure"], 595 "name": "box#.figure" 599 "name": "box#.threshold", 600 "caption": "Level of detection", 607 "name": "box#.sensitivity", 608 "caption": "Sensitivity", 615 "name": "box#.minimumDuration", 616 "caption": "Minimum duration (s)", 636 "filledCheckItems": ["line#.figure"], 639 "type": "LineFigure", 640 "name": "line#.figure" 644 "name": "line#.person", 646 "defaultValue": false 650 "name": "line#.vehicle", 651 "caption": "Vehicle", 652 "defaultValue": false 656 "name": "line#.crossing", 657 "caption": "Crossing", 658 "defaultValue": false 667 "caption": "Polyline", 670 "type": "LineFigure", 671 "name": "testPolyLine", 672 "caption": "Polyline", 679 "caption": "Polygon", 682 "type": "PolygonFigure", 683 "name": "testPolygon", 684 "caption": "Polygon outside of a repeater", 685 "description": "The points of this polygon are considered as a plugin-side setting", 693 "caption": "Size Constraints", 696 "type": "ObjectSizeConstraints", 697 "name": "testSizeConstraints", 698 "caption": "Object size constraints", 699 "description": "Size range an object should fit into to be detected", 700 "defaultValue": {"minimum": [0.1, 0.4], "maximum": [0.2, 0.8]} Definition: apple_utils.h:6