Skip to content

HOCR_SDK_CPU_CreateFromImrModelFile

Included header

#include <HOCR_SDK_CPU.h>

Description

API that creates and initializes an 'ArgoEngineApi' object using an integrated resource file (*.imr)

HOCR_SDK_CPU_CreateFromImrModelFile()

bool HOCR_SDK_CPU_CreateFromImrModelFile(void** obj, char* licensePath, char* engineLibDirPath, char* imrModelDataPath, char* name, bool isRecovery, bool isSelfCheck, int enginesCount)
Parameters
NameTypeDescription
objvoid**

Pointer to pointer for returning the created 'ArgoEngineApi' object

licensePathchar*

Runtime license file

engineLibDirPathchar*

Path to the engine module libraries

imrModelDataPathchar*

Integrated resource file path (*.imr)

namechar*

Name

isRecoverybool

Use auto recovery mode; if an issue occurs in the SDK engine, it restarts itself

isSelfCheckbool

Use self-check mode; the SDK engine periodically calls APIs internally to verify normal operation

enginesCountint

Number of SDK engine instances

Return value

bool: success (true) or failure (false)

Examples

void *obj = nullptr;
std::string runtimeLicensePath = "../bin64/Hancom.trial.license";
std::string engineLibPath = "../bin64/libs/CPU/modulelibs";
std::string imrResourcePath = "../assets/Hancom.25.12.01.cpu.imr";
std::string objName = "Sample";
bool isRecovery = true;
bool isSelfCheck = false;
int enginesCount = 1;

bool isSuccess = HOCR_SDK_CPU_CreateFromImrModelFile(
&obj,
runtimeLicensePath.data(),
engineLibPath.data(),
imrResourcePath.data(),
objName.data(),
isRecovery,
isSelfCheck,
enginesCount
);