const long long GetVersion() const;
|
Function: Obtains the plug-in version information.
Return value: version number (long long)
|
-
|
const char *GetInferMode() const;
|
Function: Obtains the algorithm inference type.
Return value: SYNC or ASYNC
|
-
|
int SyncProcess(IRequest *request, IResponse *&response);
|
Function: Executes a synchronous algorithm.
Return value: Returns 0 if the operation is successful; returns a non-zero value otherwise.
|
request: Passes the request content to the algorithm plug-in over the data channel between the engine server and the plug-in. This parameter must not be null.
response: Receives the synchronous algorithm execution result returned by the algorithm plug-in over the data channel between the engine server and the plug-in. This parameter must not be null.
|
int AsyncProcess(IRequest *request, IPluginAlgorithmCallback *callback);
|
Function: Executes an asynchronous algorithm.
Return value: Returns 0 if the operation is successful; returns a non-zero value otherwise.
|
request: Passes the request content to the algorithm plug-in over the data channel between the engine server and the plug-in. This parameter must not be null.
callback: Returns the asynchronous algorithm execution result to the engine server. This parameter must not be null.
|
int Prepare(long long transactionId, const DataInfo &inputInfo, DataInfo &outputInfo);
|
Function: Loads an algorithm plug-in.
Return value: Returns 0 if the operation is successful; returns a non-zero value otherwise.
|
transactionId: Indicates the transaction ID, which is used to identify the client and session. This parameter must not be null.
inputInfo: Indicates input information specified for algorithm plug-in loading. This parameter can be null.
outputInfo: Indicates output information in the return result of algorithm plug-in loading. This parameter can be null.
|
int Release(bool isFullUnload, long long transactionId, const DataInfo &inputInfo);
|
Function: Uninstalls an algorithm plug-in.
Return value: Returns 0 if the operation is successful; returns a non-zero value otherwise.
|
isFullUnload: Indicates whether a plug-in is called by only one client. A plug-in can be uninstalled only when it is called by only one client. This parameter must not be null.
transactionId: Indicates the transaction ID, which is used to identify the client and session. This parameter must not be null.
inputInfo: Indicates input information specified for algorithm plug-in uninstallation. This parameter can be null.
|
int SetOption(int optionType, const DataInfo &inputInfo);
|
Function: Sets configuration items. You can use this API to pass algorithm's extended information to plug-ins.
Return value: Returns 0 if the operation is successful; returns a non-zero value otherwise.
|
optionType: Indicates the algorithm for obtaining the configuration item information. An algorithm plug-in can use this parameter as needed. This parameter must not be null.
inputInfo: Indicates algorithm parameter information. An algorithm plug-in can use this parameter as needed. This parameter can be null.
|
int GetOption(int optionType, const DataInfo &inputInfo, DataInfo &outputInfo);
|
Function: Obtains configuration item information based on the specified optionType and inputInfo.
Return value: Returns 0 if the operation is successful; returns a non-zero value otherwise.
|
optionType: Indicates the algorithm for obtaining the configuration item information. This parameter must not be null.
inputInfo: Indicates input information specified for obtaining configuration item information of the algorithm. This parameter can be null.
outputInfo: Indicates the configuration item information in the return result. This parameter can be null.
|