Class: Analytics

Analytics()

Constructor

new Analytics()

Source:

Methods

createAnalyticsModules(configurationToken, xml, callbackopt)

Add one or more analytics modules to an existing VideoAnalyticsConfiguration. The available supported types can be retrieved via GetSupportedAnalyticsModules, where the Name of the supported AnalyticsModules correspond to the type of an AnalyticsModule instance.
Pass unique module names which can be later used as reference. The Parameters of the analytics module must match those of the corresponding AnalyticsModuleDescription.
Although this method is mandatory a device implementation must not support adding modules. Instead it can provide a fixed set of predefined configurations via the media service function GetCompatibleVideoAnalyticsConfigurations.
The device shall ensure that a corresponding analytics engine starts operation when a client subscribes directly or indirectly for events produced by the analytics or rule engine or when a client requests the corresponding scene description stream. An analytics module must be attached to a Video source using the media profiles before it can be used. In case differing analytics configurations are attached to the same profile it is undefined which of the analytics module configuration becomes active if no stream is activated or multiple streams with different profiles are activated at the same time.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
xml AnalyticsModule-xml AnalyticsModule xml.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

createRequest(body)

Private function for creating a SOAP request.
Parameters:
Name Type Description
body string The body of the xml.
Source:

createRules(configurationToken, xml, callbackopt)

Add one or more rules to an existing VideoAnalyticsConfiguration. The available supported types can be retrieved via GetSupportedRules, where the Name of the supported rule correspond to the type of an rule instance.
Pass unique module names which can be later used as reference. The Parameters of the rules must match those of the corresponding description.
Although this method is mandatory a device implementation must not support adding rules. Instead it can provide a fixed set of predefined configurations via the media service function GetCompatibleVideoAnalyticsConfigurations.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an SupportedAnalyticsModule Type returned from GetSupportedAnalyticsModules.
xml Rule-xml Rule xml.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

deleteAnalyticsModules(configurationToken, analyticsModuleName, callbackopt)

Remove one or more analytics modules from a VideoAnalyticsConfiguration referenced by their names.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing Video Analytics configuration.
analyticsModuleName string Name of the AnalyticsModule to be deleted.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

deleteRules(configurationToken, ruleName, callbackopt)

Remove one or more rules from a VideoAnalyticsConfiguration.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
ruleName string References the specific rule to be deleted (e.g. "MyLineDetector").
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getAnalyticsModuleOptions(configurationToken, type, callbackopt)

Return the options for the supported analytics modules that specify an Option attribute.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing AnalyticsConfiguration.
type string Reference to an SupportedAnalyticsModule Type returned from GetSupportedAnalyticsModules.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getAnalyticsModules(configurationToken, callbackopt) → {AnalyticsModule-xml}

List the currently assigned set of analytics modules of a VideoAnalyticsConfiguration.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
callback callback <optional>
Optional callback, instead of a Promise.
Source:
Returns:
AnalyticsModule xml.
Type
AnalyticsModule-xml

getRuleOptions(configurationToken, ruleType, callbackopt)

Return the options for the supported rules that specify an Option attribute.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing analytics configuration.
ruleType string Reference to an SupportedRule Type returned from GetSupportedRules.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getRules(configurationToken, callbackopt)

List the currently assigned set of rules of a VideoAnalyticsConfiguration.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getServiceCapabilities(callbackopt)

Returns the capabilities of the analytics service. The result is returned in a typed answer.
Parameters:
Name Type Attributes Description
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getSupportedAnalyticsModules(configurationToken, callbackopt)

List all analytics modules that are supported by the given VideoAnalyticsConfiguration. The result of this method may depend on the overall Video analytics configuration of the device, which is available via the current set of profiles.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

getSupportedRules(configurationToken, callbackopt) → {Rules-xml}

List all rules that are supported by the given VideoAnalyticsConfiguration. The result of this method may depend on the overall Video analytics configuration of the device, which is available via the current set of profiles.
Parameters:
Name Type Attributes Description
configurationToken string References an existing Video Analytics configuration. The list of available tokens can be obtained via the Media service Media#getVideoAnalyticsConfigurations method.
callback callback <optional>
Optional callback, instead of a Promise.
Source:
Returns:
The Rules xml.
Type
Rules-xml

init(timeDiff, serviceAddress, usernameopt, passwordopt)

Call this function directly after instantiating an Analytics object.
Parameters:
Name Type Attributes Description
timeDiff number The onvif device's time difference.
serviceAddress object An url object from url package - require('url').
username string <optional>
Optional only if the device does NOT have a user.
password string <optional>
Optional only if the device does NOT have a password.
Source:

modifyAnalyticsModules(configurationToken, xml, callbackopt)

Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
xml AnalyticsModule-xml AnalyticsModule xml.
callback callback <optional>
Optional callback, instead of a Promise.
Source:

modifyRules(configurationToken, xml, callbackopt)

Modify one or more rules of a VideoAnalyticsConfiguration. The rules are referenced by their names.
Parameters:
Name Type Attributes Description
configurationToken string Reference to an existing VideoAnalyticsConfiguration.
xml Rule-xml Rule xml.
callback callback <optional>
Optional callback, instead of a Promise.
Source: