nx_metadata_sdk  1.0
Metadata SDK
Analytics Taxonomy

// Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/

This document describes the mechanism for defining Event and Object types and their Attributes. Such definitions are made in "typeLibrary" field in the Engine or DeviceAgent JSON manifest; for details of those manifests see src/nx/sdk/analytics/manifests.md.

In the VMS there is a number of pre-defined types which can be used by Plugins either directly, or via inheriting and extending. Such types are called Base Library; their definition can be found in the file default_type_library.json supplied with the SDK.

The example of defining a Type Library, as well as using the Base Library, can be found in Stub Analytics Plugin, "Taxonomy features" sub-plugin, located in this SDK: samples/stub_analytics_plugin/src/nx/vms_server_plugins/analytics/stub/taxonomy_features/device_agent_manifest.h


General information

A Type Library is a JSON object which contain the following lists of entities (in any order):

"typeLibrary":
{
"enumTypes": [ ... ],
"colorTypes": [ ... ],
"objectTypes": [ ... ],
"eventTypes": [ ... ],
"eventGroups": [ ... ]
}

Each such entity is described in detail below.

Enum types

This JSON object describes an Enum type which can be used as a type of an Attribute. It has the following fields:

Color types

This JSON object describes a Color type which can be used as a type of an Attribute. It has the following fields:

Object types

This JSON object describes an Object type. It has the following fields:

Event types

This JSON object describes an Event type. It has the following fields:

Event groups

This JSON object describes a Group for Event types. The particular Group is referenced from an Event Type via its "groupId" field. The Group definition has the following fields:

Objects and Events can have a list of Attributes, each Attribute being defined with a JSON object containing the following fields:

Other fields depend on the particular attribute type.

Attributes that are inherited from the base type can be "re-defined" as follows:

Attribute types