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"};
28 const std::string kFixedObjectColorSetting{
"fixedObjectColor"};
29 const std::string kNoSpecialColorSettingValue{
"No special color"};
31 const std::string kDeclareAdditionalEventTypesSetting{
"declareAdditionalEventTypesSetting"};
33 const std::string kBlinkingObjectPeriodMsSetting{
"blinkingObjectPeriodMs"};
34 const std::string kBlinkingObjectInDedicatedPacketSetting{
"blinkingObjectInDedicatedPacket"};
36 const std::string kGenerateObjectsEveryNFramesSetting{
"generateObjectsEveryNFrames"};
37 const std::string kNumberOfObjectsToGenerateSetting{
"numberOfObjectsToGenerate"};
38 const std::string kGeneratePreviewPacketSetting{
"generatePreviewPacket"};
39 const std::string kPreviewImageFileSetting{
"previewImageFile"};
40 const std::string kGeneratePreviewAfterNFramesSetting(
"generatePreviewAfterNFrames");
41 const std::string kThrowPluginDiagnosticEventsFromDeviceAgentSetting{
42 "throwPluginDiagnosticEventsFromDeviceAgent"};
44 const std::string kThrowPluginDiagnosticEventsFromEngineSetting{
45 "throwPluginDiagnosticEventsFromEngine"};
46 const std::string kDisableStreamSelectionSetting{
"disableStreamSelection"};
47 const std::string kLeakFramesSetting{
"leakFrames"};
48 const std::string kAdditionalFrameProcessingDelayMsSetting{
"additionalFrameProcessingDelayMs"};
49 const std::string kOverallMetadataDelayMsSetting{
"overallMetadataDelayMs"};
51 static const std::string kRegularSettingsModelOption =
"regular";
52 static const std::string kAlternativeSettingsModelOption =
"alternative";
54 static const std::string kSettingsModelSettings =
"settingsModelComboBox";
56 static const std::string kCitySelector =
"languageSelectorSettings";
57 static const std::string kEnglishOption =
"English";
58 static const std::string kGermanOption =
"German";
60 static const std::string kAlternativeSettingsModel =
61 1 + (
const char*) R
"json(" 67 "name": ")json" + kSettingsModelSettings + R"json(", 68 "caption": "Settings model", 69 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 71 ")json" + kRegularSettingsModelOption + R"json(", 72 ")json" + kAlternativeSettingsModelOption + R"json(" 77 "caption": "Alternative GroupBox", 81 "name": "alternativeCheckBox", 82 "caption": "Alternative CheckBox", 87 "name": "alternativeTextField", 88 "caption": "Alternative TextField", 89 "defaultValue": "alternative text" 96 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 102 "name": ")json" + kSettingsModelSettings + R"json(", 103 "caption": "Settings model", 104 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 106 ")json" + kRegularSettingsModelOption + R"json(", 107 ")json" + kAlternativeSettingsModelOption + R"json(" 112 "caption": "Real Stub DeviceAgent settings", 116 "caption": "Object generation settings", 119 static const std::string kStubObjectTypesSettings = R
"json( 122 "name": ")json" + kGenerateCarsSetting + R"json(", 123 "caption": "Generate cars", 128 "name": ")json" + kGenerateTrucksSetting + R"json(", 129 "caption": "Generate trucks", 134 "name": ")json" + kGeneratePedestriansSetting + R"json(", 135 "caption": "Generate pedestrians", 140 "name": ")json" + kGenerateHumanFacesSetting + R"json(", 141 "caption": "Generate human faces", 146 "name": ")json" + kGenerateBicyclesSetting + R"json(", 147 "caption": "Generate bicycles", 152 "name": ")json" + kGenerateStonesSetting + R"json(", 153 "caption": "Generate stones", 154 "defaultValue": false 158 "name": ")json" + kGenerateFixedObjectSetting + R"json(", 159 "caption": "Generate fixed object", 160 "description": "Generates a fixed object with coordinates (0.25, 0.25, 0.25, 0.25)", 161 "defaultValue": false 165 "name": ")json" + kFixedObjectColorSetting + R"json(", 166 "caption": "Fixed object color", 168 ")json" + kNoSpecialColorSettingValue + R"json(", 169 "Magenta", "Blue", "Green", "Yellow", "Cyan", "Purple", "Orange", 170 "Red", "White", "#FFFFC0", "!invalid!", "#NONHEX" 172 "defaultValue": ")json" + kNoSpecialColorSettingValue + R"json(" 176 "name": ")json" + kGenerateCounterSetting + R"json(", 177 "caption": "Generate counter", 178 "description": "Generates a counter", 179 "defaultValue": false 182 "type": "DoubleSpinBox", 183 "caption": "Size of the side of the counter bounding box", 184 "name": ")json" + kCounterBoundingBoxSideSizeSetting + R"json(", 190 "type": "DoubleSpinBox", 191 "caption": "Counter bounding box X-Offset", 192 "name": ")json" + kCounterXOffsetSetting + R"json(", 198 "type": "DoubleSpinBox", 199 "caption": "Counter bounding box Y-Offset", 200 "name": ")json" + kCounterYOffsetSetting + R"json(", 207 "name": ")json" + kBlinkingObjectPeriodMsSetting + R"json(", 208 "caption": "Generate 1-frame BlinkingObject every N ms (if not 0)", 215 "name": ")json" + kBlinkingObjectInDedicatedPacketSetting + R"json(", 216 "caption": "Put BlinkingObject into a dedicated MetadataPacket", 217 "defaultValue": false 220 static const std::string kRegularSettingsModelPart1Continuation = R
"json( 223 "caption": "Declare additional event types", 224 "name": ")json" + kDeclareAdditionalEventTypesSetting + R"json(", 225 "defaultValue": false 229 "name": ")json" + kNumberOfObjectsToGenerateSetting + R"json(", 230 "caption": "Number of objects to generate", 237 "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(", 238 "caption": "Generate objects every N frames", 245 "name": ")json" + kGeneratePreviewPacketSetting + R"json(", 246 "caption": "Generate preview packet", 251 "name": ")json" + kPreviewImageFileSetting + R"json(", 252 "caption": "Preview image file", 253 "description": "Path to an image which should be used as a preview for tracks" 257 "name": ")json" + kGeneratePreviewAfterNFramesSetting + R"json(", 258 "caption": "Generate preview after N frames", 265 "name": ")json" + kOverallMetadataDelayMsSetting + R"json(", 266 "caption": "Overall metadata delay, ms", 269 "maxValue": 1000000000 275 "name": ")json" + kGenerateEventsSetting + R"json(", 276 "caption": "Generate events", 281 "name": ")json" + kThrowPluginDiagnosticEventsFromDeviceAgentSetting + R"json(", 282 "caption": "Produce Plugin Diagnostic Events from the DeviceAgent", 283 "defaultValue": false 287 "name": ")json" + kLeakFramesSetting + R"json(", 288 "caption": "Force a memory leak when processing a video frame", 289 "defaultValue": false 293 "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(", 294 "caption": "Additional frame processing delay, ms", 297 "maxValue": 1000000000 303 "caption": "Example Stub DeviceAgent settings", 307 "name": "testTextField", 308 "caption": "Device Agent Text Field", 309 "description": "A text field", 310 "defaultValue": "a text" 314 "name": ")json" + kCitySelector + R"json(", 316 "defaultValue": "English", 318 ")json" + kEnglishOption + R"json(", 319 ")json" + kGermanOption + R"json(" 323 static const std::string kEnglishCitiesPart = 1 + R
"json( 325 "type": "RadioButtonGroup", 326 "name": "testEnglishRadioButtonGroup", 327 "caption": "Choose one", 328 "description": "Choose one option", 329 "defaultValue": "London", 336 static const std::string kGermanCitiesPart = 1 + R
"json( 338 "type": "RadioButtonGroup", 339 "name": "testGermanRadioButtonGroup", 340 "caption": "Choose one", 341 "description": "Choose one option", 342 "defaultValue": "Berlin", 350 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 352 "type": "RadioButtonGroup", 353 "name": "testRadioButtonGroup", 354 "caption": "RadioButton Group", 355 "description": "Choose one option", 356 "defaultValue": "Cs_enodatum", 369 "K_gowerianus": "Kepplerites gowerianus", 370 "K_galilaeii": "Kepplerites galilaeii", 371 "S_calloviense": "Sigaloceras calloviense", 372 "S_micans": "Sigaloceras micans", 373 "Cs_enodatum": "Catasigaloceras enodatum", 374 "K_medea": "Kosmoceras medea", 375 "K_jason": "Kosmoceras jason", 376 "K_obductum": "Kosmoceras obductum", 377 "K_posterior": "Kosmoceras posterior" 381 "type": "CheckBoxGroup", 382 "name": "testCheckBoxGroup", 383 "caption": "CheckBox Group", 384 "description": "Choose one or several options", 385 "defaultValue": ["Coleoidea", "Nautiloidea"], 393 "Coleoidea": "Coleoidea (Bather, 1888)", 394 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 395 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 396 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 401 "caption": "Device Agent SpinBox (plugin side)", 402 "name": "pluginSideTestSpinBox", 408 "type": "DoubleSpinBox", 409 "caption": "Device Agent DoubleSpinBox", 410 "name": "testDoubleSpinBox", 411 "defaultValue": 3.1415, 417 "name": "testComboBox", 418 "caption": "Device Agent ComboBox", 419 "defaultValue": "value2", 420 "range": ["value1", "value2", "value3"], 422 "value1": "Device Agent Value #1", 423 "value2": "Device Agent Value #2", 424 "value3": "Device Agent Value #3" 432 "caption": "Device Agent CheckBox", 433 "name": "testCheckBox", 438 "caption": "Disabled Device Agent CheckBox", 439 "name": "disabledTestCheckBox", 440 "defaultValue": false, 445 "caption": "Hidden Device Agent CheckBox", 446 "name": "hiddenTestCheckBox", 447 "defaultValue": false, 455 static const std::string kRegularSettingsModelPart3 =
459 "caption": "Example", 463 "caption": "Example Stub DeviceAgent settings", 467 "name": "testTextFieldWithValidation", 468 "caption": "Hexadecimal number text field", 469 "defaultValue": "12ab34cd", 470 "validationRegex": "^[a-f0-9]+$", 471 "validationRegexFlags": "i", 472 "validationErrorMessage": "Text must contain only digits and characters a-f, e.g. 12ab34cd." 476 "caption": "Device Agent SpinBox (plugin side)", 477 "name": "pluginSideTestSpinBox2", 483 "type": "DoubleSpinBox", 484 "caption": "Device Agent DoubleSpinBox", 485 "name": "testDoubleSpinBox2", 486 "defaultValue": 3.1415, 492 "name": "testComboBox2", 493 "caption": "Device Agent ComboBox", 494 "defaultValue": "value2", 495 "range": ["value1", "value2", "value3"] 499 "caption": "Device Agent CheckBox", 500 "name": "testCheckBox2", 509 "caption": "Nested section", 513 "caption": "Nested Section Example", 516 "type": "SwitchButton", 517 "caption": "Switch Button", 518 "name": "testSwitch", 519 "description": "Tooltip for the switch button", 520 "defaultValue": false 524 "caption": "SpinBox Parameter", 525 "name": "testSpinBox3", 531 "type": "DoubleSpinBox", 532 "caption": "DoubleSpinBox Parameter", 533 "name": "testDoubleSpinBox3", 534 "defaultValue": 3.1415, 540 "name": "testComboBox3", 541 "caption": "ComboBox Parameter", 542 "defaultValue": "value2", 543 "range": ["value1", "value2", "value3"] 547 "caption": "CheckBox Parameter", 548 "name": "testCheckBox3", 563 "caption": "Polygons", 566 "type": "PolygonFigure", 567 "name": "excludedArea.figure", 568 "caption": "Excluded area", 569 "useLabelField": false, 577 "caption": "Polygon #", 578 "filledCheckItems": ["polygon#.figure"], 581 "type": "PolygonFigure", 582 "name": "polygon#.figure", 588 "name": "polygon#.threshold", 589 "caption": "Level of detection", 596 "name": "polygon#.sensitivity", 597 "caption": "Sensitivity", 604 "name": "polygon#.minimumDuration", 605 "caption": "Minimum duration (s)", 625 "filledCheckItems": ["box#.figure"], 629 "name": "box#.figure" 633 "name": "box#.threshold", 634 "caption": "Level of detection", 641 "name": "box#.sensitivity", 642 "caption": "Sensitivity", 649 "name": "box#.minimumDuration", 650 "caption": "Minimum duration (s)", 670 "filledCheckItems": ["line#.figure"], 673 "type": "LineFigure", 674 "name": "line#.figure" 678 "name": "line#.person", 680 "defaultValue": false 684 "name": "line#.vehicle", 685 "caption": "Vehicle", 686 "defaultValue": false 690 "name": "line#.crossing", 691 "caption": "Crossing", 692 "defaultValue": false 701 "caption": "Polyline", 704 "type": "LineFigure", 705 "name": "testPolyLine", 706 "caption": "Polyline", 713 "caption": "Polygon", 716 "type": "PolygonFigure", 717 "name": "testPolygon", 718 "caption": "Polygon outside of a repeater", 719 "description": "The points of this polygon are considered as a plugin-side setting", 727 "caption": "Size Constraints", 730 "type": "ObjectSizeConstraints", 731 "name": "testSizeConstraints", 732 "caption": "Object size constraints", 733 "description": "Size range an object should fit into to be detected", 734 "defaultValue": {"minimum": [0.1, 0.4], "maximum": [0.2, 0.8]} Definition: apple_utils.h:6