nx_metadata_sdk
1.0
Metadata SDK
|
#include <i_engine.h>
Classes | |
class | IHandler |
Public Member Functions | |
virtual void | setEngineInfo (const IEngineInfo *engineInfo)=0 |
Result< const ISettingsResponse * > | setSettings (const IStringMap *settings) |
Result< const ISettingsResponse * > | pluginSideSettings () const |
Result< const IString * > | manifest () const |
virtual bool | isCompatible (const IDeviceInfo *deviceInfo) const =0 |
Result< IDeviceAgent * > | obtainDeviceAgent (const IDeviceInfo *deviceInfo) |
Result< IAction::Result > | executeAction (const IAction *action) |
virtual void | setHandler (IHandler *handler)=0 |
![]() | |
virtual IRefCountable * | queryInterface (const InterfaceId *id) |
Ptr< Interface > | queryInterface () |
Ptr< const Interface > | queryInterface () const |
![]() | |
virtual | ~IRefCountable ()=default |
template<class Interface > | |
Ptr< Interface > | queryInterface () |
template<class Interface > | |
Ptr< const Interface > | queryInterface () const |
virtual int | addRef () const =0 |
virtual int | releaseRef () const =0 |
int | refCountThreadUnsafe () const |
Static Public Member Functions | |
static auto | interfaceId () |
![]() | |
static auto | interfaceId () |
Protected Member Functions | |
virtual void | doSetSettings (Result< const ISettingsResponse *> *outResult, const IStringMap *settings)=0 |
virtual void | getPluginSideSettings (Result< const ISettingsResponse *> *outResult) const =0 |
virtual void | getManifest (Result< const IString *> *outResult) const =0 |
virtual void | doObtainDeviceAgent (Result< IDeviceAgent *> *outResult, const IDeviceInfo *deviceInfo)=0 |
virtual void | doExecuteAction (Result< IAction::Result > *outResult, const IAction *action)=0 |
![]() | |
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override |
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId) |
Additional Inherited Members | |
![]() | |
template<int len> | |
static constexpr const InterfaceId * | makeId (const char(&charArray)[len]) |
template<class TemplateInstance , class TemplateArg , int len> | |
static const InterfaceId * | makeIdForTemplate (const char(&baseIdCharArray)[len]) |
Main interface for an Analytics Engine instance. The instances are created by a Mediaserver via calling analytics::IPlugin::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 overlapping even if from different threads (i.e. with a guaranteed barrier between the calls), thus, no synchronization is required for the implementation.
|
protectedpure virtual |
Called by executeAction()
|
protectedpure virtual |
Called by obtainDeviceAgent()
|
protectedpure virtual |
Called by setSettings()
|
inline |
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. |
|
protectedpure virtual |
Called by manifest()
|
protectedpure virtual |
Called by pluginSideSettings()
|
pure virtual |
Provides a JSON Manifest for this Engine instance. See the example of such Manifest in stub_analytics_plugin.
When creating the new IEngine instance, this method is called after setSettings(), but the Manifest must not depend on the setting values, because it will not be re-requested on settings change afterwards.
See the manifest specification in Analytics Plugin Manifests.
|
inline |
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. |
|
inline |
In addition to the settings stored in the 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 |
|
pure virtual |
handler | Generic Engine-related events (errors, warning, info messages) might be reported via this handler. |
|
inline |
Receives the values of settings stored in the Server database for this Engine instance. The values must conform to the Settings Model, which is initially defined in the Plugin Manifest, but may be overridden via returning an updated Model from this method.
After creating the new IEngine instance, this method is called after setEngineInfo() but before manifest().
settings | Values of settings conforming to the Settings Model. Never null. |