6 namespace vms_server_plugins {
10 const std::string kGenerateEventsSetting{
"generateEvents"};
11 const std::string kMotionVisualizationObjectType{
"nx.stub.motionVisualization"};
13 const std::string kGenerateCarsSetting{
"generateCars"};
14 const std::string kGenerateTrucksSetting{
"generateTrucks"};
15 const std::string kGeneratePedestriansSetting{
"generatePedestrians"};
16 const std::string kGenerateHumanFacesSetting{
"generateHumanFaces"};
17 const std::string kGenerateBicyclesSetting{
"generateBicycles"};
18 const std::string kGenerateStonesSetting{
"generateStones"};
19 const std::string kGenerateFixedObjectSetting{
"generateFixedObject"};
20 const std::string kGenerateCounterSetting{
"generateCounter"};
21 const std::string kCounterBoundingBoxSideSizeSetting{
"counterBoundingBoxSideSize"};
22 const std::string kCounterXOffsetSetting{
"counterXOffset"};
23 const std::string kCounterYOffsetSetting{
"counterYOffset"};
25 const std::string kBlinkingObjectPeriodMsSetting{
"blinkingObjectPeriodMs"};
26 const std::string kBlinkingObjectInDedicatedPacketSetting{
"blinkingObjectInDedicatedPacket"};
28 const std::string kGenerateObjectsEveryNFramesSetting{
"generateObjectsEveryNFrames"};
29 const std::string kNumberOfObjectsToGenerateSetting{
"numberOfObjectsToGenerate"};
30 const std::string kGeneratePreviewPacketSetting{
"generatePreviewPacket"};
31 const std::string kGeneratePreviewAfterNFramesSetting(
"generatePreviewAfterNFrames");
32 const std::string kThrowPluginDiagnosticEventsFromDeviceAgentSetting{
33 "throwPluginDiagnosticEventsFromDeviceAgent"};
35 const std::string kThrowPluginDiagnosticEventsFromEngineSetting{
36 "throwPluginDiagnosticEventsFromDeviceAgent"};
37 const std::string kDisableStreamSelectionSetting{
"disableStreamSelection"};
38 const std::string kLeakFramesSetting{
"leakFrames"};
39 const std::string kAdditionalFrameProcessingDelayMsSetting{
"additionalFrameProcessingDelayMs"};
40 const std::string kOverallMetadataDelayMsSetting{
"overallMetadataDelayMs"};
41 const std::string kUsePluginAsSettingsOriginForDeviceAgents{
42 "usePluginAsSettingsOriginForDeviceAgents"};
44 static const std::string kRegularSettingsModelOption =
"regular";
45 static const std::string kAlternativeSettingsModelOption =
"alternative";
47 static const std::string kSettingsModelSettings =
"settingsModelComboBox";
49 static const std::string kCitySelector =
"languageSelectorSettings";
50 static const std::string kEnglishOption =
"English";
51 static const std::string kGermanOption =
"German";
53 static const std::string kAlternativeSettingsModel =
54 1 + (
const char*) R
"json(" 60 "name": ")json" + kSettingsModelSettings + R"json(", 61 "caption": "Settings model", 62 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 64 ")json" + kRegularSettingsModelOption + R"json(", 65 ")json" + kAlternativeSettingsModelOption + R"json(" 70 "caption": "Alternative GroupBox", 74 "name": "alternativeCheckBox", 75 "caption": "Alternative CheckBox", 80 "name": "alternativeTextField", 81 "caption": "Alternative TextField", 82 "defaultValue": "alternative text" 89 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 95 "name": ")json" + kSettingsModelSettings + R"json(", 96 "caption": "Settings model", 97 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 99 ")json" + kRegularSettingsModelOption + R"json(", 100 ")json" + kAlternativeSettingsModelOption + R"json(" 105 "caption": "Real Stub DeviceAgent settings", 109 "caption": "Object generation settings", 113 "name": ")json" + kGenerateCarsSetting + R"json(", 114 "caption": "Generate cars", 119 "name": ")json" + kGenerateTrucksSetting + R"json(", 120 "caption": "Generate trucks", 125 "name": ")json" + kGeneratePedestriansSetting + R"json(", 126 "caption": "Generate pedestrians", 131 "name": ")json" + kGenerateHumanFacesSetting + R"json(", 132 "caption": "Generate human faces", 137 "name": ")json" + kGenerateBicyclesSetting + R"json(", 138 "caption": "Generate bicycles", 143 "name": ")json" + kGenerateStonesSetting + R"json(", 144 "caption": "Generate stones", 145 "defaultValue": false 149 "name": ")json" + kGenerateFixedObjectSetting + R"json(", 150 "caption": "Generate fixed object", 151 "description": "Generates a fixed object with coordinates (0.25, 0.25, 0.25, 0.25)", 152 "defaultValue": false 156 "name": ")json" + kGenerateCounterSetting + R"json(", 157 "caption": "Generate counter", 158 "description": "Generates a counter", 159 "defaultValue": false 162 "type": "DoubleSpinBox", 163 "caption": "Size of the side of the counter bounding box", 164 "name": ")json" + kCounterBoundingBoxSideSizeSetting + R"json(", 170 "type": "DoubleSpinBox", 171 "caption": "Counter bounding box X-Offset", 172 "name": ")json" + kCounterXOffsetSetting + R"json(", 178 "type": "DoubleSpinBox", 179 "caption": "Counter bounding box Y-Offset", 180 "name": ")json" + kCounterYOffsetSetting + R"json(", 187 "name": ")json" + kBlinkingObjectPeriodMsSetting + R"json(", 188 "caption": "Generate 1-frame BlinkingObject every N ms (if not 0)", 195 "name": ")json" + kBlinkingObjectInDedicatedPacketSetting + R"json(", 196 "caption": "Put BlinkingObject into a dedicated MetadataPacket", 197 "defaultValue": false 201 "name": ")json" + kNumberOfObjectsToGenerateSetting + R"json(", 202 "caption": "Number of objects to generate", 209 "name": ")json" + kGenerateObjectsEveryNFramesSetting + R"json(", 210 "caption": "Generate objects every N frames", 217 "name": ")json" + kGeneratePreviewPacketSetting + R"json(", 218 "caption": "Generate preview packet", 223 "name": ")json" + kGeneratePreviewAfterNFramesSetting + R"json(", 224 "caption": "Generate preview after N frames", 231 "name": ")json" + kOverallMetadataDelayMsSetting + R"json(", 232 "caption": "Overall metadata delay, ms", 235 "maxValue": 1000000000 241 "name": ")json" + kGenerateEventsSetting + R"json(", 242 "caption": "Generate events", 247 "name": ")json" + kThrowPluginDiagnosticEventsFromDeviceAgentSetting + R"json(", 248 "caption": "Produce Plugin Diagnostic Events from the DeviceAgent", 249 "defaultValue": false 253 "name": ")json" + kLeakFramesSetting + R"json(", 254 "caption": "Force a memory leak when processing a video frame", 255 "defaultValue": false 259 "name": ")json" + kAdditionalFrameProcessingDelayMsSetting + R"json(", 260 "caption": "Additional frame processing delay, ms", 263 "maxValue": 1000000000 269 "caption": "Example Stub DeviceAgent settings", 273 "name": "testTextField", 274 "caption": "Device Agent Text Field", 275 "description": "A text field", 276 "defaultValue": "a text" 280 "name": ")json" + kCitySelector + R"json(", 282 "defaultValue": "English", 284 ")json" + kEnglishOption + R"json(", 285 ")json" + kGermanOption + R"json(" 289 static const std::string kEnglishCitiesPart = 1 + R
"json( 291 "type": "RadioButtonGroup", 292 "name": "testEnglishRadioButtonGroup", 293 "caption": "Choose one", 294 "description": "Choose one option", 295 "defaultValue": "London", 302 static const std::string kGermanCitiesPart = 1 + R
"json( 304 "type": "RadioButtonGroup", 305 "name": "testGermanRadioButtonGroup", 306 "caption": "Choose one", 307 "description": "Choose one option", 308 "defaultValue": "Berlin", 316 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 318 "type": "RadioButtonGroup", 319 "name": "testRadioButtonGroup", 320 "caption": "RadioButton Group", 321 "description": "Choose one option", 322 "defaultValue": "Cs_enodatum", 335 "K_gowerianus": "Kepplerites gowerianus", 336 "K_galilaeii": "Kepplerites galilaeii", 337 "S_calloviense": "Sigaloceras calloviense", 338 "S_micans": "Sigaloceras micans", 339 "Cs_enodatum": "Catasigaloceras enodatum", 340 "K_medea": "Kosmoceras medea", 341 "K_jason": "Kosmoceras jason", 342 "K_obductum": "Kosmoceras obductum", 343 "K_posterior": "Kosmoceras posterior" 347 "type": "CheckBoxGroup", 348 "name": "testCheckBoxGroup", 349 "caption": "CheckBox Group", 350 "description": "Choose one or several options", 351 "defaultValue": ["Coleoidea", "Nautiloidea"], 359 "Coleoidea": "Coleoidea (Bather, 1888)", 360 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 361 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 362 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 367 "caption": "Device Agent SpinBox (plugin side)", 368 "name": "pluginSideTestSpinBox", 374 "type": "DoubleSpinBox", 375 "caption": "Device Agent DoubleSpinBox", 376 "name": "testDoubleSpinBox", 377 "defaultValue": 3.1415, 383 "name": "testComboBox", 384 "caption": "Device Agent ComboBox", 385 "defaultValue": "value2", 386 "range": ["value1", "value2", "value3"], 388 "value1": "Device Agent Value #1", 389 "value2": "Device Agent Value #2", 390 "value3": "Device Agent Value #3" 398 "caption": "Device Agent CheckBox", 399 "name": "testCheckBox", 404 "caption": "Disabled Device Agent CheckBox", 405 "name": "disabledTestCheckBox", 406 "defaultValue": false, 411 "caption": "Hidden Device Agent CheckBox", 412 "name": "hiddenTestCheckBox", 413 "defaultValue": false, 422 "caption": "Example", 426 "caption": "Example Stub DeviceAgent settings", 430 "name": "testTextFieldWithValidation", 431 "caption": "Hexadecimal number text field", 432 "defaultValue": "12ab34cd", 433 "validationRegex": "^[a-f0-9]+$", 434 "validationRegexFlags": "i", 435 "validationErrorMessage": "Text must contain only digits and characters a-f, e.g. 12ab34cd." 439 "caption": "Device Agent SpinBox (plugin side)", 440 "name": "pluginSideTestSpinBox2", 446 "type": "DoubleSpinBox", 447 "caption": "Device Agent DoubleSpinBox", 448 "name": "testDoubleSpinBox2", 449 "defaultValue": 3.1415, 455 "name": "testComboBox2", 456 "caption": "Device Agent ComboBox", 457 "defaultValue": "value2", 458 "range": ["value1", "value2", "value3"] 462 "caption": "Device Agent CheckBox", 463 "name": "testCheckBox2", 472 "caption": "Nested section", 476 "caption": "Nested Section Example", 479 "type": "SwitchButton", 480 "caption": "Switch Button", 481 "name": "testSwitch", 482 "description": "Tooltip for the switch button", 483 "defaultValue": false 487 "caption": "SpinBox Parameter", 488 "name": "testSpinBox3", 494 "type": "DoubleSpinBox", 495 "caption": "DoubleSpinBox Parameter", 496 "name": "testDoubleSpinBox3", 497 "defaultValue": 3.1415, 503 "name": "testComboBox3", 504 "caption": "ComboBox Parameter", 505 "defaultValue": "value2", 506 "range": ["value1", "value2", "value3"] 510 "caption": "CheckBox Parameter", 511 "name": "testCheckBox3", 526 "caption": "Polygons", 533 "caption": "Polygon #", 534 "filledCheckItems": ["polygon#.figure"], 537 "type": "PolygonFigure", 538 "name": "polygon#.figure", 544 "name": "polygon#.threshold", 545 "caption": "Level of detection", 552 "name": "polygon#.sensitivity", 553 "caption": "Sensitivity", 560 "name": "polygon#.minimumDuration", 561 "caption": "Minimum duration (s)", 581 "filledCheckItems": ["box#.figure"], 585 "name": "box#.figure" 589 "name": "box#.threshold", 590 "caption": "Level of detection", 597 "name": "box#.sensitivity", 598 "caption": "Sensitivity", 605 "name": "box#.minimumDuration", 606 "caption": "Minimum duration (s)", 626 "filledCheckItems": ["line#.figure"], 629 "type": "LineFigure", 630 "name": "line#.figure" 634 "name": "line#.person", 636 "defaultValue": false 640 "name": "line#.vehicle", 641 "caption": "Vehicle", 642 "defaultValue": false 646 "name": "line#.crossing", 647 "caption": "Crossing", 648 "defaultValue": false 657 "caption": "Polyline", 660 "type": "LineFigure", 661 "name": "testPolyLine", 662 "caption": "Polyline", 669 "caption": "Polygon", 672 "type": "PolygonFigure", 673 "name": "testPolygon", 674 "caption": "Polygon outside of a repeater", 675 "description": "The points of this polygon are considered as a plugin-side setting", 683 "caption": "Size Constraints", 686 "type": "ObjectSizeConstraints", 687 "name": "testSizeConstraints", 688 "caption": "Object size constraints", 689 "description": "Size range an object should fit into to be detected", 690 "defaultValue": {"minimum": [0.1, 0.4], "maximum": [0.2, 0.8]} Definition: apple_utils.h:6