stub_analytics_plugin
1.6
Network Optix Video Analytics SDK
|
#include <engine.h>
Classes | |
class | IHandler |
Public Member Functions | |
virtual Plugin * | plugin () const =0 |
virtual void | setSettings (const Settings *settings)=0 |
virtual Settings * | pluginSideSettings () const =0 |
virtual const IString * | manifest (Error *outError) const =0 |
virtual DeviceAgent * | obtainDeviceAgent (const DeviceInfo *deviceInfo, Error *outError)=0 |
virtual void | executeAction (Action *action, Error *outError)=0 |
virtual Error | setHandler (IHandler *handler)=0 |
![]() | |
virtual void * | queryInterface (const nxpl::NX_GUID &interfaceID)=0 |
Cast to type, specified by interfaceID. More... | |
virtual unsigned int | addRef ()=0 |
Increment reference counter. More... | |
virtual unsigned int | releaseRef ()=0 |
Decrement reference counter. More... | |
Main interface for an Analytics Engine instance. The instances are created by a Mediaserver via calling analytics::Plugin::createEngine() typically on Mediaserver start (or when a new Engine is created by the system administrator), and destroyed (via releaseRef()) on Mediaserver shutdown (or when an existing Engine is deleted by the system administrator).
For the VMS end user, each Engine instance is perceived as an independent Analytics Engine which has its own set of values of settings stored in the Mediaserver database.
All methods are guaranteed to be called without overlappings, even if from different threads, thus, no synchronization is required for the implementation.
|
pure virtual |
Action handler. Called when some action defined by this Engine is triggered by Server.
action | Provides data for the action such as metadata object for which the action has been triggered, and a means for reporting back action results to Server. This object should not be used after returning from this function. |
outError | Status of the operation; is set to noError before this call. |
|
pure virtual |
Provides a JSON manifest for this Engine instance. See the example of such manifest in stub_analytics_plugin. Can either be static (constant), or can be dynamically generated by this Engine based on its current state, including setting values received via setSettings(). After creation of this Engine instance, this method is called after setSettings(), but can be called again at any other moment to obtain the most actual manifest.
outError | Status of the operation; is set to noError before this call. |
|
pure virtual |
Creates, or returns an already existing, a DeviceAgent instance intended to work with the given device.
deviceInfo | Information about the device for which a DeviceAgent should be created. |
outError | Status of the operation; is set to noError before this call. |
|
pure virtual |
In addition to the settings stored in a Server database, an Engine can have some settings which are stored somewhere "under the hood" of the Engine, e.g. on a device acting as an Engine's backend. Such settings do not need to be explicitly marked in the Settings Model, but every time the Server offers the user to edit the values, it calls this method and merges the received values with the ones in its database.
|
pure virtual |
handler | Generic Engine-related events (errors, warning, info messages) might be reported via this handler. |
|
pure virtual |
Called before other methods. Server provides the set of settings stored in its database for this Engine instance.
settings | Values of settings declared in the manifest. Never null. Valid only during the call. |