nx_metadata_sdk
1.0
Metadata SDK
|
#include <i_device_agent.h>
Classes | |
class | IHandler |
class | IHandler0 |
Public Member Functions | |
Result< const ISettingsResponse * > | setSettings (const IStringMap *settings) |
Result< const ISettingsResponse * > | pluginSideSettings () const |
Result< const IString * > | manifest () const |
virtual void | setHandler (IHandler *handler)=0 |
Result< void > | setNeededMetadataTypes (const IMetadataTypes *neededMetadataTypes) |
![]() | |
virtual IRefCountable * | queryInterface (const InterfaceId *id) |
Ptr< RefCountable > | queryInterface () |
Ptr< const RefCountable > | queryInterface () const |
![]() | |
virtual | ~IRefCountable ()=default |
template<class RefCountable > | |
Ptr< RefCountable > | queryInterface () |
template<class RefCountable > | |
Ptr< const RefCountable > | 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 | doSetNeededMetadataTypes (Result< void > *outResult, const IMetadataTypes *neededMetadataTypes)=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]) |
![]() | |
template<typename RefCountable > | |
static constexpr bool | hasAlternativeInterfaceId = HasAlternativeInterfaceId<RefCountable>::value |
Metadata producer for a particular Device (e.g. a camera). This is a base interface which allows to identify the Device which the Engine has been assigned to work with, and is suitable only for Plugins which generate metadata without additional input from the Device. If the Plugin requires input data from the Device (e.g. video frames from the camera), it may implement one of the derived interfaces that offer such data.
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 setNeededMetadataTypes()
|
protectedpure virtual |
Called by setSettings()
|
protectedpure virtual |
Called by manifest()
|
protectedpure virtual |
Called by pluginSideSettings()
Provides DeviceAgent Manifest in JSON format.
See the manifest specification in Analytics Plugin Manifests.
|
inline |
In addition to the settings stored in a Server database, a DeviceAgent can have some settings which are stored somewhere "under the hood" of the DeviceAgent, e.g. on a device acting as a DeviceAgent'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 | Processes event metadata and object metadata fetched by DeviceAgent. DeviceAgent should fetch events metadata after setNeededMetadataTypes() call. Generic device related events (errors, warning, info messages) might also be reported via this handler. |
|
inline |
Sets a list of metadata types that are needed by the Server. Empty list means that the Server does not need any metadata from this DeviceAgent.
neededMetadataTypes | Lists of type ids of events and objects. |
|
inline |
Receives the values of settings stored in the Server database for the combination of a device instance and an Engine instance.
After creating the new IDeviceAgent instance, this method is called after manifest().
ATTENTION: If the DeviceAgent has some plugin-side settings (see pluginSideSettings()) which are hosted in the backend (e.g. on the Device) and potentially can be changed by the user directly on that backend, their values must be ignored in this function when it is called for the first time after the creation of the DeviceAgent. Otherwise, these values, which technically are the values last known to the Server, may override the values stored in the backend and potentially changed by the user directly during the period when the DeviceAgent did not exist (i.e., Analytics has been turned off for this Device).
settings | Values of settings conforming to the Settings Model. Never null. |