nx_metadata_sdk
1.0
Metadata SDK
|
#include <i_device_agent.h>
Classes | |
class | IHandler |
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< 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 | 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]) |
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 |
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. |
|
protectedpure virtual |
Called before other methods. Server provides the set of settings stored in its database, combined with the values received from the plugin via pluginSideSettings() (if any), for the combination of a device instance and an Engine instance.
settings | Values of settings declared in the manifest. Never null. |
|
protectedpure virtual |
Provides DeviceAgent manifest in JSON format.
|
protectedpure virtual |
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. |