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