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 kPreviewImageFileSetting{
"previewImageFile"};
38 const std::string kGeneratePreviewAfterNFramesSetting(
"generatePreviewAfterNFrames");
39 const std::string kThrowPluginDiagnosticEventsFromDeviceAgentSetting{
40 "throwPluginDiagnosticEventsFromDeviceAgent"};
42 const std::string kThrowPluginDiagnosticEventsFromEngineSetting{
43 "throwPluginDiagnosticEventsFromEngine"};
44 const std::string kDisableStreamSelectionSetting{
"disableStreamSelection"};
45 const std::string kLeakFramesSetting{
"leakFrames"};
46 const std::string kAdditionalFrameProcessingDelayMsSetting{
"additionalFrameProcessingDelayMs"};
47 const std::string kOverallMetadataDelayMsSetting{
"overallMetadataDelayMs"};
49 static const std::string kRegularSettingsModelOption =
"regular";
50 static const std::string kAlternativeSettingsModelOption =
"alternative";
52 static const std::string kSettingsModelSettings =
"settingsModelComboBox";
54 static const std::string kCitySelector =
"languageSelectorSettings";
55 static const std::string kEnglishOption =
"English";
56 static const std::string kGermanOption =
"German";
58 static const std::string kAlternativeSettingsModel =
59 1 + (
const char*) R
"json(" 65 "name": ")json" + kSettingsModelSettings + R"json(", 66 "caption": "Settings model", 67 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 69 ")json" + kRegularSettingsModelOption + R"json(", 70 ")json" + kAlternativeSettingsModelOption + R"json(" 75 "caption": "Alternative GroupBox", 79 "name": "alternativeCheckBox", 80 "caption": "Alternative CheckBox", 85 "name": "alternativeTextField", 86 "caption": "Alternative TextField", 87 "defaultValue": "alternative text" 94 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 100 "name": ")json" + kSettingsModelSettings + R"json(", 101 "caption": "Settings model", 102 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 104 ")json" + kRegularSettingsModelOption + R"json(", 105 ")json" + kAlternativeSettingsModelOption + R"json(" 110 "caption": "Real Stub DeviceAgent settings", 114 "caption": "Object generation settings", 118 "name": ")json" + kGenerateCarsSetting + R"json(", 119 "caption": "Generate cars", 124 "name": ")json" + kGenerateTrucksSetting + R"json(", 125 "caption": "Generate trucks", 130 "name": ")json" + kGeneratePedestriansSetting + R"json(", 131 "caption": "Generate pedestrians", 136 "name": ")json" + kGenerateHumanFacesSetting + R"json(", 137 "caption": "Generate human faces", 142 "name": ")json" + kGenerateBicyclesSetting + R"json(", 143 "caption": "Generate bicycles", 148 "name": ")json" + kGenerateStonesSetting + R"json(", 149 "caption": "Generate stones", 150 "defaultValue": false 154 "name": ")json" + kGenerateFixedObjectSetting + R"json(", 155 "caption": "Generate fixed object", 156 "description": "Generates a fixed object with coordinates (0.25, 0.25, 0.25, 0.25)", 157 "defaultValue": false 161 "name": ")json" + kGenerateCounterSetting + R"json(", 162 "caption": "Generate counter", 163 "description": "Generates a counter", 164 "defaultValue": false 167 "type": "DoubleSpinBox", 168 "caption": "Size of the side of the counter bounding box", 169 "name": ")json" + kCounterBoundingBoxSideSizeSetting + R"json(", 175 "type": "DoubleSpinBox", 176 "caption": "Counter bounding box X-Offset", 177 "name": ")json" + kCounterXOffsetSetting + R"json(", 183 "type": "DoubleSpinBox", 184 "caption": "Counter bounding box Y-Offset", 185 "name": ")json" + kCounterYOffsetSetting + R"json(", 192 "caption": "Declare additional event types", 193 "name": ")json" + kDeclareAdditionalEventTypesSetting + R"json(", 194 "defaultValue": false 198 "name": ")json" + kBlinkingObjectPeriodMsSetting + R"json(", 199 "caption": "Generate 1-frame BlinkingObject every N ms (if not 0)", 206 "name": ")json" + kBlinkingObjectInDedicatedPacketSetting + R"json(", 207 "caption": "Put BlinkingObject into a dedicated MetadataPacket", 208 "defaultValue": false 212 "name": ")json" + kNumberOfObjectsToGenerateSetting + R"json(", 213 "caption": "Number of objects to generate", 220 "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(", 221 "caption": "Generate objects every N frames", 228 "name": ")json" + kGeneratePreviewPacketSetting + R"json(", 229 "caption": "Generate preview packet", 234 "name": ")json" + kPreviewImageFileSetting + R"json(", 235 "caption": "Preview image file", 236 "description": "Path to an image which should be used as a preview for tracks" 240 "name": ")json" + kGeneratePreviewAfterNFramesSetting + R"json(", 241 "caption": "Generate preview after N frames", 248 "name": ")json" + kOverallMetadataDelayMsSetting + R"json(", 249 "caption": "Overall metadata delay, ms", 252 "maxValue": 1000000000 258 "name": ")json" + kGenerateEventsSetting + R"json(", 259 "caption": "Generate events", 264 "name": ")json" + kThrowPluginDiagnosticEventsFromDeviceAgentSetting + R"json(", 265 "caption": "Produce Plugin Diagnostic Events from the DeviceAgent", 266 "defaultValue": false 270 "name": ")json" + kLeakFramesSetting + R"json(", 271 "caption": "Force a memory leak when processing a video frame", 272 "defaultValue": false 276 "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(", 277 "caption": "Additional frame processing delay, ms", 280 "maxValue": 1000000000 286 "caption": "Example Stub DeviceAgent settings", 290 "name": "testTextField", 291 "caption": "Device Agent Text Field", 292 "description": "A text field", 293 "defaultValue": "a text" 297 "name": ")json" + kCitySelector + R"json(", 299 "defaultValue": "English", 301 ")json" + kEnglishOption + R"json(", 302 ")json" + kGermanOption + R"json(" 306 static const std::string kEnglishCitiesPart = 1 + R
"json( 308 "type": "RadioButtonGroup", 309 "name": "testEnglishRadioButtonGroup", 310 "caption": "Choose one", 311 "description": "Choose one option", 312 "defaultValue": "London", 319 static const std::string kGermanCitiesPart = 1 + R
"json( 321 "type": "RadioButtonGroup", 322 "name": "testGermanRadioButtonGroup", 323 "caption": "Choose one", 324 "description": "Choose one option", 325 "defaultValue": "Berlin", 333 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 335 "type": "RadioButtonGroup", 336 "name": "testRadioButtonGroup", 337 "caption": "RadioButton Group", 338 "description": "Choose one option", 339 "defaultValue": "Cs_enodatum", 352 "K_gowerianus": "Kepplerites gowerianus", 353 "K_galilaeii": "Kepplerites galilaeii", 354 "S_calloviense": "Sigaloceras calloviense", 355 "S_micans": "Sigaloceras micans", 356 "Cs_enodatum": "Catasigaloceras enodatum", 357 "K_medea": "Kosmoceras medea", 358 "K_jason": "Kosmoceras jason", 359 "K_obductum": "Kosmoceras obductum", 360 "K_posterior": "Kosmoceras posterior" 364 "type": "CheckBoxGroup", 365 "name": "testCheckBoxGroup", 366 "caption": "CheckBox Group", 367 "description": "Choose one or several options", 368 "defaultValue": ["Coleoidea", "Nautiloidea"], 376 "Coleoidea": "Coleoidea (Bather, 1888)", 377 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 378 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 379 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 384 "caption": "Device Agent SpinBox (plugin side)", 385 "name": "pluginSideTestSpinBox", 391 "type": "DoubleSpinBox", 392 "caption": "Device Agent DoubleSpinBox", 393 "name": "testDoubleSpinBox", 394 "defaultValue": 3.1415, 400 "name": "testComboBox", 401 "caption": "Device Agent ComboBox", 402 "defaultValue": "value2", 403 "range": ["value1", "value2", "value3"], 405 "value1": "Device Agent Value #1", 406 "value2": "Device Agent Value #2", 407 "value3": "Device Agent Value #3" 415 "caption": "Device Agent CheckBox", 416 "name": "testCheckBox", 421 "caption": "Disabled Device Agent CheckBox", 422 "name": "disabledTestCheckBox", 423 "defaultValue": false, 428 "caption": "Hidden Device Agent CheckBox", 429 "name": "hiddenTestCheckBox", 430 "defaultValue": false, 439 "caption": "Example", 443 "caption": "Example Stub DeviceAgent settings", 447 "name": "testTextFieldWithValidation", 448 "caption": "Hexadecimal number text field", 449 "defaultValue": "12ab34cd", 450 "validationRegex": "^[a-f0-9]+$", 451 "validationRegexFlags": "i", 452 "validationErrorMessage": "Text must contain only digits and characters a-f, e.g. 12ab34cd." 456 "caption": "Device Agent SpinBox (plugin side)", 457 "name": "pluginSideTestSpinBox2", 463 "type": "DoubleSpinBox", 464 "caption": "Device Agent DoubleSpinBox", 465 "name": "testDoubleSpinBox2", 466 "defaultValue": 3.1415, 472 "name": "testComboBox2", 473 "caption": "Device Agent ComboBox", 474 "defaultValue": "value2", 475 "range": ["value1", "value2", "value3"] 479 "caption": "Device Agent CheckBox", 480 "name": "testCheckBox2", 489 "caption": "Nested section", 493 "caption": "Nested Section Example", 496 "type": "SwitchButton", 497 "caption": "Switch Button", 498 "name": "testSwitch", 499 "description": "Tooltip for the switch button", 500 "defaultValue": false 504 "caption": "SpinBox Parameter", 505 "name": "testSpinBox3", 511 "type": "DoubleSpinBox", 512 "caption": "DoubleSpinBox Parameter", 513 "name": "testDoubleSpinBox3", 514 "defaultValue": 3.1415, 520 "name": "testComboBox3", 521 "caption": "ComboBox Parameter", 522 "defaultValue": "value2", 523 "range": ["value1", "value2", "value3"] 527 "caption": "CheckBox Parameter", 528 "name": "testCheckBox3", 543 "caption": "Polygons", 546 "type": "PolygonFigure", 547 "name": "excludedArea.figure", 548 "caption": "Excluded area", 549 "useLabelField": false, 557 "caption": "Polygon #", 558 "filledCheckItems": ["polygon#.figure"], 561 "type": "PolygonFigure", 562 "name": "polygon#.figure", 568 "name": "polygon#.threshold", 569 "caption": "Level of detection", 576 "name": "polygon#.sensitivity", 577 "caption": "Sensitivity", 584 "name": "polygon#.minimumDuration", 585 "caption": "Minimum duration (s)", 605 "filledCheckItems": ["box#.figure"], 609 "name": "box#.figure" 613 "name": "box#.threshold", 614 "caption": "Level of detection", 621 "name": "box#.sensitivity", 622 "caption": "Sensitivity", 629 "name": "box#.minimumDuration", 630 "caption": "Minimum duration (s)", 650 "filledCheckItems": ["line#.figure"], 653 "type": "LineFigure", 654 "name": "line#.figure" 658 "name": "line#.person", 660 "defaultValue": false 664 "name": "line#.vehicle", 665 "caption": "Vehicle", 666 "defaultValue": false 670 "name": "line#.crossing", 671 "caption": "Crossing", 672 "defaultValue": false 681 "caption": "Polyline", 684 "type": "LineFigure", 685 "name": "testPolyLine", 686 "caption": "Polyline", 693 "caption": "Polygon", 696 "type": "PolygonFigure", 697 "name": "testPolygon", 698 "caption": "Polygon outside of a repeater", 699 "description": "The points of this polygon are considered as a plugin-side setting", 707 "caption": "Size Constraints", 710 "type": "ObjectSizeConstraints", 711 "name": "testSizeConstraints", 712 "caption": "Object size constraints", 713 "description": "Size range an object should fit into to be detected", 714 "defaultValue": {"minimum": [0.1, 0.4], "maximum": [0.2, 0.8]} Definition: apple_utils.h:6