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", 120 "name": ")json" + kGenerateCarsSetting + R"json(", 121 "caption": "Generate cars", 126 "name": ")json" + kGenerateTrucksSetting + R"json(", 127 "caption": "Generate trucks", 132 "name": ")json" + kGeneratePedestriansSetting + R"json(", 133 "caption": "Generate pedestrians", 138 "name": ")json" + kGenerateHumanFacesSetting + R"json(", 139 "caption": "Generate human faces", 144 "name": ")json" + kGenerateBicyclesSetting + R"json(", 145 "caption": "Generate bicycles", 150 "name": ")json" + kGenerateStonesSetting + R"json(", 151 "caption": "Generate stones", 152 "defaultValue": false 156 "name": ")json" + kGenerateFixedObjectSetting + R"json(", 157 "caption": "Generate fixed object", 158 "description": "Generates a fixed object with coordinates (0.25, 0.25, 0.25, 0.25)", 159 "defaultValue": false 163 "name": ")json" + kFixedObjectColorSetting + R"json(", 164 "caption": "Fixed object color", 166 ")json" + kNoSpecialColorSettingValue + R"json(", 167 "Magenta", "Blue", "Green", "Yellow", "Cyan", "Purple", "Orange", 168 "Red", "White", "#FFFFC0", "!invalid!", "#NONHEX" 170 "defaultValue": ")json" + kNoSpecialColorSettingValue + R"json(" 174 "name": ")json" + kGenerateCounterSetting + R"json(", 175 "caption": "Generate counter", 176 "description": "Generates a counter", 177 "defaultValue": false 180 "type": "DoubleSpinBox", 181 "caption": "Size of the side of the counter bounding box", 182 "name": ")json" + kCounterBoundingBoxSideSizeSetting + R"json(", 188 "type": "DoubleSpinBox", 189 "caption": "Counter bounding box X-Offset", 190 "name": ")json" + kCounterXOffsetSetting + R"json(", 196 "type": "DoubleSpinBox", 197 "caption": "Counter bounding box Y-Offset", 198 "name": ")json" + kCounterYOffsetSetting + R"json(", 205 "caption": "Declare additional event types", 206 "name": ")json" + kDeclareAdditionalEventTypesSetting + R"json(", 207 "defaultValue": false 211 "name": ")json" + kBlinkingObjectPeriodMsSetting + R"json(", 212 "caption": "Generate 1-frame BlinkingObject every N ms (if not 0)", 219 "name": ")json" + kBlinkingObjectInDedicatedPacketSetting + R"json(", 220 "caption": "Put BlinkingObject into a dedicated MetadataPacket", 221 "defaultValue": false 225 "name": ")json" + kNumberOfObjectsToGenerateSetting + R"json(", 226 "caption": "Number of objects to generate", 233 "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(", 234 "caption": "Generate objects every N frames", 241 "name": ")json" + kGeneratePreviewPacketSetting + R"json(", 242 "caption": "Generate preview packet", 247 "name": ")json" + kPreviewImageFileSetting + R"json(", 248 "caption": "Preview image file", 249 "description": "Path to an image which should be used as a preview for tracks" 253 "name": ")json" + kGeneratePreviewAfterNFramesSetting + R"json(", 254 "caption": "Generate preview after N frames", 261 "name": ")json" + kOverallMetadataDelayMsSetting + R"json(", 262 "caption": "Overall metadata delay, ms", 265 "maxValue": 1000000000 271 "name": ")json" + kGenerateEventsSetting + R"json(", 272 "caption": "Generate events", 277 "name": ")json" + kThrowPluginDiagnosticEventsFromDeviceAgentSetting + R"json(", 278 "caption": "Produce Plugin Diagnostic Events from the DeviceAgent", 279 "defaultValue": false 283 "name": ")json" + kLeakFramesSetting + R"json(", 284 "caption": "Force a memory leak when processing a video frame", 285 "defaultValue": false 289 "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(", 290 "caption": "Additional frame processing delay, ms", 293 "maxValue": 1000000000 299 "caption": "Example Stub DeviceAgent settings", 303 "name": "testTextField", 304 "caption": "Device Agent Text Field", 305 "description": "A text field", 306 "defaultValue": "a text" 310 "name": ")json" + kCitySelector + R"json(", 312 "defaultValue": "English", 314 ")json" + kEnglishOption + R"json(", 315 ")json" + kGermanOption + R"json(" 319 static const std::string kEnglishCitiesPart = 1 + R
"json( 321 "type": "RadioButtonGroup", 322 "name": "testEnglishRadioButtonGroup", 323 "caption": "Choose one", 324 "description": "Choose one option", 325 "defaultValue": "London", 332 static const std::string kGermanCitiesPart = 1 + R
"json( 334 "type": "RadioButtonGroup", 335 "name": "testGermanRadioButtonGroup", 336 "caption": "Choose one", 337 "description": "Choose one option", 338 "defaultValue": "Berlin", 346 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 348 "type": "RadioButtonGroup", 349 "name": "testRadioButtonGroup", 350 "caption": "RadioButton Group", 351 "description": "Choose one option", 352 "defaultValue": "Cs_enodatum", 365 "K_gowerianus": "Kepplerites gowerianus", 366 "K_galilaeii": "Kepplerites galilaeii", 367 "S_calloviense": "Sigaloceras calloviense", 368 "S_micans": "Sigaloceras micans", 369 "Cs_enodatum": "Catasigaloceras enodatum", 370 "K_medea": "Kosmoceras medea", 371 "K_jason": "Kosmoceras jason", 372 "K_obductum": "Kosmoceras obductum", 373 "K_posterior": "Kosmoceras posterior" 377 "type": "CheckBoxGroup", 378 "name": "testCheckBoxGroup", 379 "caption": "CheckBox Group", 380 "description": "Choose one or several options", 381 "defaultValue": ["Coleoidea", "Nautiloidea"], 389 "Coleoidea": "Coleoidea (Bather, 1888)", 390 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 391 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 392 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 397 "caption": "Device Agent SpinBox (plugin side)", 398 "name": "pluginSideTestSpinBox", 404 "type": "DoubleSpinBox", 405 "caption": "Device Agent DoubleSpinBox", 406 "name": "testDoubleSpinBox", 407 "defaultValue": 3.1415, 413 "name": "testComboBox", 414 "caption": "Device Agent ComboBox", 415 "defaultValue": "value2", 416 "range": ["value1", "value2", "value3"], 418 "value1": "Device Agent Value #1", 419 "value2": "Device Agent Value #2", 420 "value3": "Device Agent Value #3" 428 "caption": "Device Agent CheckBox", 429 "name": "testCheckBox", 434 "caption": "Disabled Device Agent CheckBox", 435 "name": "disabledTestCheckBox", 436 "defaultValue": false, 441 "caption": "Hidden Device Agent CheckBox", 442 "name": "hiddenTestCheckBox", 443 "defaultValue": false, 452 "caption": "Example", 456 "caption": "Example Stub DeviceAgent settings", 460 "name": "testTextFieldWithValidation", 461 "caption": "Hexadecimal number text field", 462 "defaultValue": "12ab34cd", 463 "validationRegex": "^[a-f0-9]+$", 464 "validationRegexFlags": "i", 465 "validationErrorMessage": "Text must contain only digits and characters a-f, e.g. 12ab34cd." 469 "caption": "Device Agent SpinBox (plugin side)", 470 "name": "pluginSideTestSpinBox2", 476 "type": "DoubleSpinBox", 477 "caption": "Device Agent DoubleSpinBox", 478 "name": "testDoubleSpinBox2", 479 "defaultValue": 3.1415, 485 "name": "testComboBox2", 486 "caption": "Device Agent ComboBox", 487 "defaultValue": "value2", 488 "range": ["value1", "value2", "value3"] 492 "caption": "Device Agent CheckBox", 493 "name": "testCheckBox2", 502 "caption": "Nested section", 506 "caption": "Nested Section Example", 509 "type": "SwitchButton", 510 "caption": "Switch Button", 511 "name": "testSwitch", 512 "description": "Tooltip for the switch button", 513 "defaultValue": false 517 "caption": "SpinBox Parameter", 518 "name": "testSpinBox3", 524 "type": "DoubleSpinBox", 525 "caption": "DoubleSpinBox Parameter", 526 "name": "testDoubleSpinBox3", 527 "defaultValue": 3.1415, 533 "name": "testComboBox3", 534 "caption": "ComboBox Parameter", 535 "defaultValue": "value2", 536 "range": ["value1", "value2", "value3"] 540 "caption": "CheckBox Parameter", 541 "name": "testCheckBox3", 556 "caption": "Polygons", 559 "type": "PolygonFigure", 560 "name": "excludedArea.figure", 561 "caption": "Excluded area", 562 "useLabelField": false, 570 "caption": "Polygon #", 571 "filledCheckItems": ["polygon#.figure"], 574 "type": "PolygonFigure", 575 "name": "polygon#.figure", 581 "name": "polygon#.threshold", 582 "caption": "Level of detection", 589 "name": "polygon#.sensitivity", 590 "caption": "Sensitivity", 597 "name": "polygon#.minimumDuration", 598 "caption": "Minimum duration (s)", 618 "filledCheckItems": ["box#.figure"], 622 "name": "box#.figure" 626 "name": "box#.threshold", 627 "caption": "Level of detection", 634 "name": "box#.sensitivity", 635 "caption": "Sensitivity", 642 "name": "box#.minimumDuration", 643 "caption": "Minimum duration (s)", 663 "filledCheckItems": ["line#.figure"], 666 "type": "LineFigure", 667 "name": "line#.figure" 671 "name": "line#.person", 673 "defaultValue": false 677 "name": "line#.vehicle", 678 "caption": "Vehicle", 679 "defaultValue": false 683 "name": "line#.crossing", 684 "caption": "Crossing", 685 "defaultValue": false 694 "caption": "Polyline", 697 "type": "LineFigure", 698 "name": "testPolyLine", 699 "caption": "Polyline", 706 "caption": "Polygon", 709 "type": "PolygonFigure", 710 "name": "testPolygon", 711 "caption": "Polygon outside of a repeater", 712 "description": "The points of this polygon are considered as a plugin-side setting", 720 "caption": "Size Constraints", 723 "type": "ObjectSizeConstraints", 724 "name": "testSizeConstraints", 725 "caption": "Object size constraints", 726 "description": "Size range an object should fit into to be detected", 727 "defaultValue": {"minimum": [0.1, 0.4], "maximum": [0.2, 0.8]} Definition: apple_utils.h:6