nx_metadata_sdk
1.0
Metadata SDK
|
#include <engine.h>
Public Member Functions | |
virtual void | setEngineInfo (const IEngineInfo *engineInfo) override |
virtual void | setHandler (IEngine::IHandler *handler) override |
virtual bool | isCompatible (const IDeviceInfo *deviceInfo) const override |
![]() | |
RefCountable (const RefCountable &)=delete | |
RefCountable (RefCountable &&)=delete | |
RefCountable & | operator= (const RefCountable &)=delete |
RefCountable & | operator= (RefCountable &&)=delete |
virtual int | addRef () const override |
virtual int | releaseRef () const override |
int | refCount () const |
Protected Member Functions | |
Engine (bool enableOutput, const std::string &pluginInstanceId="") | |
virtual std::string | manifestString () const =0 |
virtual Result< const ISettingsResponse * > | settingsReceived () |
std::string | settingValue (const std::string &settingName) const |
std::map< std::string, std::string > | currentSettings () const |
virtual Result< IAction::Result > | executeAction (const std::string &actionId, Uuid objectTrackId, Uuid deviceId, int64_t timestampUs, Ptr< IObjectTrackInfo > trackInfo, const std::map< std::string, std::string > ¶ms) |
void | pushPluginDiagnosticEvent (IPluginDiagnosticEvent::Level level, std::string caption, std::string description) const |
IHandler * | handler () const |
virtual void | doGetSettingsOnActiveSettingChange (Result< const IActiveSettingChangedResponse *> *outResult, const IActiveSettingChangedAction *activeSettingChangedAction) override |
virtual void | doSetSettings (Result< const ISettingsResponse *> *outResult, const IStringMap *settings) override |
virtual void | getPluginSideSettings (Result< const ISettingsResponse *> *outResult) const override |
virtual void | getManifest (Result< const IString *> *outResult) const override |
virtual void | doExecuteAction (Result< IAction::Result > *outResult, const IAction *action) override |
Protected Attributes | |
LogUtils | logUtils |
Base class for a typical implementation of an Analytics Engine. Hides many technical details of the Analytics Plugin SDK, but may limit plugin capabilities - use only when suitable.
To use NX_PRINT/NX_OUTPUT in a derived class with the prefix defined by this class, add the following to the derived class .cpp:
#define NX_PRINT_PREFIX (this->logUtils.printPrefix)
#include <nx/kit/debug.h>
|
protected |
enableOutput | Enables NX_OUTPUT. Typically, use NX_DEBUG_ENABLE_OUTPUT as a value. |
instanceId | Must be non-empty only for Plugins from multi-IPlugin libraries. |
|
protected |
Provides access to the Engine global settings stored by the Server.
ATTENTION: If settingsReceived() has not been called yet, it means that the Engine has not received its settings from the Server yet, and thus this method will yield empty values.
|
protectedvirtual |
Action handler. Called when some Action defined by this Engine is triggered by the Server.
actionId | Id of the Action being triggered. |
objectTrackId | Id of an Object Track for which the Action has been triggered. |
deviceId | Id of a Device (e.g. a camera) from which the Action has been triggered. |
timestampUs | Timestamp of the object metadata for which the Action has been triggered. |
params | If the Engine manifest defines params for the Action being triggered, contains their values after they are filled by the user via the Client form. Otherwise, empty. |
Reimplemented in nx::vms_server_plugins::analytics::stub::special_objects::Engine, and nx::vms_server_plugins::analytics::stub::object_actions::Engine.
|
protected |
Sends a PluginDiagnosticEvent to the Server. Can be called from any thread, but if called before settingsReceived() was called, will be ignored in case setHandler() was not called yet.
|
inlineprotectedvirtual |
Called when the settings are received from the Server, even if the values are not changed. Should perform any required (re)initialization. Called even if the settings model is empty.
Reimplemented in nx::vms_server_plugins::analytics::stub::diagnostic_events::Engine, and nx::vms_server_plugins::analytics::stub::settings::Engine.
|
protected |
Provides access to the Engine global settings stored by the Server.
ATTENTION: If settingsReceived() has not been called yet, it means that the Engine has not received its settings from the Server yet, and thus this method will yield empty values.