nx_metadata_sdk  1.0
Metadata SDK
device_agent_manifest.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <string>
6 
7 namespace nx {
8 namespace vms_server_plugins {
9 namespace analytics {
10 namespace stub {
11 namespace taxonomy_features {
12 
13 static const std::string kDeviceAgentManifest = /*suppress newline*/ 1 + (const char*) R"json(
14 {
15  "supportedTypes":
16  [
17  {
18  "objectTypeId": "nx.base.Animal",
19  "attributes":
20  [
21  "Color",
22  "Size"
23  ]
24  },
25  {
26  "objectTypeId": "nx.stub.baseObjectType1",
27  "attributes":
28  [
29  "(Base) String attribute",
30  "(Base) Number attribute",
31  "(Base) Boolean attribute",
32  "(Base) Enum attribute",
33  "(Base) Color attribute",
34  "(Base) Object attribute.Nested Field 1",
35  "(Base) Object attribute.Nested Field 2"
36  ],
37  "_comment": "Supported Attributes of a nested Object are declared via `.`."
38  },
39  {
40  "objectTypeId": "nx.stub.derivedObjectType",
41  "attributes":
42  [
43  "(Base) String attribute",
44  "(Base) Number attribute",
45  "(Base) Boolean attribute",
46  "(Base) Enum attribute",
47  "(Base) Color attribute",
48  "(Base) Object attribute",
49  "(Derived) attribute 1",
50  "(Derived) attribute 2"
51  ]
52  },
53  {
54  "objectTypeId": "nx.stub.derivedObjectTypeWithOmittedAttributes",
55  "attributes":
56  [
57  "(Base) String attribute",
58  "(Derived) own attribute"
59  ]
60  },
61  {
62  "objectTypeId": "nx.stub.hiddenDerivedObjectType",
63  "attributes":
64  [
65  "(Base) String attribute",
66  "(Base) Number attribute"
67  ]
68  },
69  {
70  "objectTypeId": "nx.stub.hiddenDerivedObjectTypeWithOwnAttributes",
71  "attributes":
72  [
73  "Attribute of a hidden derived Object Type"
74  ]
75  },
76  {
77  "objectTypeId": "nx.stub.derivedObjectTypeWithUnsupportedBase",
78  "attributes":
79  [
80  "(Base 2) String attribute",
81  "(Base 2) Number attribute",
82  "(Base 2) Boolean attribute",
83  "(Derived) Enum attribute"
84  ]
85  },
86  {
87  "objectTypeId": "nx.stub.objectTypeWithNumberAttributes",
88  "attributes":
89  [
90  "Integer attribute",
91  "Floating point attribute",
92  "Number attribute with min value",
93  "Number attribute with max value",
94  "Number attribute with bounds",
95  "Number Attribute with unit",
96  "Number attribute (full example)"
97  ]
98  },
99  {
100  "objectTypeId": "nx.stub.objectTypeWithBooleanAttributes",
101  "attributes":
102  [
103  "Boolean attribute 1",
104  "Boolean attribute 2",
105  "Boolean attribute 3",
106  "Boolean attribute 4"
107  ]
108  },
109  {
110  "objectTypeId": "nx.stub.objectTypeWithIcon"
111  },
112  {
113  "objectTypeId": "nx.stub.objectTypeInheritedFromBaseLibraryType",
114  "attributes":
115  [
116  "Gender",
117  "Height",
118  "Top Clothing Color",
119  "Name",
120  "Hat",
121  "Custom Type string attribute"
122  ]
123  },
124  {
125  "objectTypeId": "nx.stub.objectTypeUsingBaseLibraryEnumType",
126  "attributes":
127  [
128  "Custom Type Enum attribute"
129  ]
130  },
131  {
132  "objectTypeId": "nx.stub.objectTypeUsingBaseLibraryColorType",
133  "attributes":
134  [
135  "Custom Type Color attribute"
136  ]
137  },
138  {
139  "objectTypeId": "nx.stub.objectTypeUsingBaseLibraryObjectType",
140  "attributes":
141  [
142  "Custom Type Object attribute",
143  "Custom Type Object attribute.Size",
144  "Custom Type Object attribute.Color",
145  "Custom Type Object attribute.Type"
146  ]
147  },
148  {
149  "objectTypeId": "nx.stub.objectTypeFromEngineManifest",
150  "attributes":
151  [
152  "String attribute (Engine)",
153  "Enum attribute (Engine)",
154  "Color attribute (Engine)",
155  "Object attribute using Object Type from Base Library (Engine)"
156  ]
157  },
158  {
159  "objectTypeId": "nx.stub.liveOnlyObjectType",
160  "attributes":
161  [
162  "Live-only Object Type attribute"
163  ]
164  },
165  {
166  "objectTypeId": "nx.stub.nonIndexableObjectType",
167  "attributes":
168  [
169  "Non-indexable Object Type attribute"
170  ]
171  }
172  ],)json" + /* Workaround for long strings. */ std::string() + R"json(
173  "typeLibrary":
174  {
175  "objectTypes":
176  [
177  {
178  "_comment": "Base Object Type containing Attributes of all types. All Attributes are declared as supported in the \"supportedTypes\" list.",
179  "id": "nx.stub.baseObjectType1",
180  "name": "Stub: Base Object Type 1",
181  "attributes":
182  [
183  {
184  "type": "String",
185  "name": "(Base) String attribute"
186  },
187  {
188  "type": "Number",
189  "name": "(Base) Number attribute"
190  },
191  {
192  "type": "Boolean",
193  "name": "(Base) Boolean attribute"
194  },
195  {
196  "type": "Enum",
197  "subtype": "nx.stub.baseEnumType",
198  "name": "(Base) Enum attribute"
199  },
200  {
201  "type": "Color",
202  "subtype": "nx.stub.baseColorType",
203  "name": "(Base) Color attribute"
204  },
205  {
206  "type": "Object",
207  "subtype": "nx.stub.attributeObjectType",
208  "name": "(Base) Object attribute"
209  }
210  ]
211  },
212  {
213  "_comment": "Base Object Type that is not declared as supported in the \"supportedTypes\" list.",
214  "id": "nx.stub.baseObjectType2",
215  "name": "Stub: Base Object Type 2",
216  "attributes":
217  [
218  {
219  "type": "String",
220  "name": "(Base 2) String attribute"
221  },
222  {
223  "type": "Number",
224  "name": "(Base 2) Number attribute"
225  },
226  {
227  "type": "Boolean",
228  "name": "(Base 2) Boolean attribute"
229  }
230  ]
231  },
232  {
233  "_comment": "Simple derived Object Type containing some additional Attributes.",
234  "id": "nx.stub.derivedObjectType",
235  "name": "Stub: Derived Object Type",
236  "base": "nx.stub.baseObjectType1",
237  "attributes":
238  [
239  {
240  "name": "(Derived) attribute 1",
241  "type": "String"
242  },
243  {
244  "name": "(Derived) attribute 2",
245  "type": "String"
246  }
247  ]
248  },
249  {
250  "_comment": "Derived Object Type that blacklists some Attributes of its base Type with \"omittedBaseAttributes\".",
251  "id": "nx.stub.derivedObjectTypeWithOmittedAttributes",
252  "name": "Stub: Derived Object Type with omitted attributes",
253  "base": "nx.stub.baseObjectType1",
254  "omittedBaseAttributes":
255  [
256  "(Base) Number attribute",
257  "(Base) Boolean attribute",
258  "(Base) Enum attribute",
259  "(Base) Color attribute",
260  "(Base) Object attribute"
261  ],
262  "attributes":
263  [
264  {
265  "name": "(Derived) own attribute",
266  "type": "Number"
267  }
268  ]
269  },
270  {
271  "_comment": "Hidden derived Object Type. Such Types are not shown in the Analytics Panel.",
272  "id": "nx.stub.hiddenDerivedObjectType",
273  "name": "Stub: Hidden derived object type",
274  "base": "nx.stub.baseObjectType1",
275  "flags": "hiddenDerivedType"
276  },
277  {
278  "_comment": "Hidden derived Object Types can have their own Attributes. Such Attributes are shown when its base Type is selected in the Analytics Panel.",
279  "id": "nx.stub.hiddenDerivedObjectTypeWithOwnAttributes",
280  "name": "Stub: Hidden derived object type with own attributes",
281  "base": "nx.stub.baseObjectType2",
282  "flags": "hiddenDerivedType",
283  "attributes":
284  [
285  {
286  "type": "String",
287  "name": "Attribute of a hidden derived Object Type"
288  }
289  ]
290  },
291  {
292  "_comment": "Declaring a Derived Object Type makes its base supported as well.",
293  "id": "nx.stub.derivedObjectTypeWithUnsupportedBase",
294  "name": "Stub: Derived Object Type with unsupported base",
295  "base": "nx.stub.baseObjectType2",
296  "attributes":
297  [
298  {
299  "type": "Enum",
300  "subtype": "nx.base.derivedEnumType",
301  "name": "Derived Object Type Enum attribute"
302  }
303  ]
304  },
305  {
306  "id": "nx.stub.objectTypeWithNumberAttributes",
307  "name": "Stub: Object Type with Number attributes",
308  "attributes":
309  [
310  {
311  "type": "Number",
312  "subtype": "integer",
313  "name": "Integer attribute"
314  },
315  {
316  "type": "Number",
317  "subtype": "float",
318  "name": "Floating point attribute"
319  },
320  {
321  "type": "Number",
322  "name": "Number attribute with min value",
323  "minValue": 10
324  },
325  {
326  "type": "Number",
327  "name": "Number attribute with max value",
328  "maxValue": 100
329  },
330  {
331  "type": "Number",
332  "name": "Number attribute with bounds",
333  "minValue": -100,
334  "maxValue": 100
335  },
336  {
337  "type": "Number",
338  "name": "Number Attribute with unit",
339  "unit": "unit"
340  },
341  {
342  "type": "Number",
343  "subtype": "integer",
344  "name": "Number attribute (full example)",
345  "minValue": -100,
346  "maxValue": 100,
347  "unit": "other unit"
348  }
349  ]
350  },
351  {
352  "id": "nx.stub.objectTypeWithBooleanAttributes",
353  "name": "Stub: Object Type with Boolean attributes",
354  "attributes":
355  [
356  {
357  "type": "Boolean",
358  "name": "Boolean attribute 1"
359  },
360  {
361  "type": "Boolean",
362  "name": "Boolean attribute 2"
363  },
364  {
365  "type": "Boolean",
366  "name": "Boolean attribute 3"
367  },
368  {
369  "type": "Boolean",
370  "name": "Boolean attribute 4"
371  }
372  ]
373  },
374  {
375  "_comment": "Object Types can be used as Attribute types, yielding a nested Object.",
376  "id": "nx.stub.attributeObjectType",
377  "name": "Stub: Attribute Object Type",
378  "attributes":
379  [
380  {
381  "type": "String",
382  "name": "Nested field 1"
383  },
384  {
385  "type": "Number",
386  "name": "Nested field 2"
387  }
388  ]
389  },
390  {
391  "id": "nx.stub.objectTypeWithIcon",
392  "name": "Stub: Object Type with icon",
393  "icon": "nx.base.car"
394  },
395  {
396  "_comment": "Object Types can inherit from the Types declared in the Base Type Library.",
397  "id": "nx.stub.objectTypeInheritedFromBaseLibraryType",
398  "name": "Stub: Object Type inherited from a Base Library Type",
399  "base": "nx.base.Person",
400  "omittedBaseAttributes":
401  [
402  "Complexion",
403  "Age",
404  "Activity",
405  "Scarf",
406  "Body Shape",
407  "Top Clothing Length",
408  "Top Clothing Grain",
409  "Top Clothing Type",
410  "Bottom Clothing Color",
411  "Bottom Clothing Length",
412  "Bottom Clothing Grain",
413  "Bottom Clothing Type",
414  "Things",
415  "Gloves",
416  "Shoes",
417  "Temperature",
418  "Tattoo"
419  ],
420  "attributes":
421  [
422  {
423  "type": "String",
424  "name": "Custom Type string attribute"
425  }
426  ]
427  },
428  {
429  "_comment": "Object Types can use Enum Types declared in the Base Library.",
430  "id": "nx.stub.objectTypeUsingBaseLibraryEnumType",
431  "name": "Stub: Custom Type using Base Library Enum Type",
432  "attributes":
433  [
434  {
435  "type": "Enum",
436  "subtype": "nx.base.Length",
437  "name": "Custom Type Enum attribute"
438  }
439  ]
440  },
441  {
442  "_comment": "Object Types can use Color Types declared in the Base Library.",
443  "id": "nx.stub.objectTypeUsingBaseLibraryColorType",
444  "name": "Stub: Custom Type using Base Library Color Type",
445  "attributes":
446  [
447  {
448  "type": "Color",
449  "subtype": "nx.base.Color",
450  "name": "Custom Type Color attribute"
451  }
452  ]
453  },
454  {
455  "_comment": "Base Library Object Types can be used to declare Attributes being nested Objects.",
456  "id": "nx.stub.objectTypeUsingBaseLibraryObjectType",
457  "name": "Stub: Custom Type using Base Library Object Type",
458  "attributes":
459  [
460  {
461  "type": "Object",
462  "subtype": "nx.base.Bag",
463  "name": "Custom Type Object attribute"
464  }
465  ]
466  },
467  {
468  "_comment": "Objects of live-only types are not recorded to the database and archive and available in the Live mode only.",
469  "id": "nx.stub.liveOnlyObjectType",
470  "name": "Stub: Live-only Object Type",
471  "flags": "liveOnly",
472  "attributes":
473  [
474  {
475  "type": "String",
476  "name": "Live-only Object Type attribute"
477  }
478  ]
479  },
480  {
481  "_comment": "Objects of non-indexable types aren't available for search, but still recorded to the archive.",
482  "id": "nx.stub.nonIndexableObjectType",
483  "name": "Stub: Non-indexable Object Type",
484  "flags": "nonIndexable",
485  "attributes":
486  [
487  {
488  "type": "String",
489  "name": "Non-indexable Object Type attribute"
490  }
491  ]
492  }
493  ],)json" + /* Workaround for long strings. */ std::string() + R"json(
494  "enumTypes":
495  [
496  {
497  "id": "nx.stub.baseEnumType",
498  "name": "Stub: Base Enum Type",
499  "items":
500  [
501  "Base Enum Type item 1",
502  "Base Enum Type item 2",
503  "Base Enum Type item 3"
504  ]
505  },
506  {
507  "id": "nx.stub.derivedEnumType",
508  "name": "Stub: Derived Enum Type",
509  "base": "nx.stub.baseEnumType",
510  "baseItems":
511  [
512  "Base Enum Type item 1",
513  "Base Enum Type item 2"
514  ],
515  "items":
516  [
517  "Derived Enum Type item 1",
518  "Derived Enum Type item 2"
519  ]
520  }
521  ],
522  "colorTypes":
523  [
524  {
525  "id": "nx.stub.baseColorType",
526  "name": "Stub: Base Color Type",
527  "items":
528  [
529  {
530  "name": "black",
531  "rgb": "#000000"
532  },
533  {
534  "name": "grey",
535  "rgb": "#808080"
536  },
537  {
538  "name": "white",
539  "rgb": "#FFFFFF"
540  }
541  ]
542  },
543  {
544  "id": "nx.stub.derivedColorType",
545  "name": "Stub: Derived Color Type",
546  "base": "nx.stub.baseColorType",
547  "baseItems":
548  [
549  "black",
550  "white"
551  ],
552  "items":
553  [
554  {
555  "name": "red",
556  "rgb": "#FF0000"
557  },
558  {
559  "name": "green",
560  "rgb": "#00FF00"
561  },
562  {
563  "name": "blue",
564  "rgb": "#0000FF"
565  }
566  ]
567  }
568  ]
569  }
570 }
571 )json";
572 
573 } // namespace taxonomy_features
574 } // namespace stub
575 } // namespace analytics
576 } // namespace vms_server_plugins
577 } // namespace nx
Definition: apple_utils.h:6