Functions

FCALL_GetError

group FCALL_GetError

Converts a returned raw error code to a common XOP error code that can be compared to the error constants.

param code:

Raw error code from the XOP

return:

common error code see FCALL_ERROR_CODES

Functions

variable FCALL_GetError(variable code)

FCALL_IsError

group FCALL_IsError

Checks if a specific error was returned.

param returned:

Raw error code returned by CallFunction XOP

param expected:

Expected error code

return:

1 if returned and expected error code equal, 0 otherwise

Functions

variable FCALL_IsError(variable returned, variable expected)

FCALL_GetCallError

group FCALL_GetCallError

Returns error code and error message from CallFunction parameterOut string. Returns code -1 if parameterOut is not in proper format.

param parameterOut:

string from FCALL_CallFunction in JSON format

param errMessage:

string that returns error message if error code != 0 is returned

return:

error code from parameterOut string

Functions

variable FCALL_GetCallError(string paramOut, string *errMessage)

FCALL_GetParameterInJSON

group FCALL_GetParameterInJSON

Returns a jsonID of an unfilled parameterIn JSON object.

param paramCnt:

[optional, default = 0], Add paramCnt empty input parameters. If paramCnt is <1 or >64 no input parameters are added.

return:

jsonID of an unfilled parameterIn JSON object

Functions

variable FCALL_GetParameterInJSON(variable paramCnt = defaultValue)

FCALL_SetupParameterIn

group FCALL_SetupParameterIn

Returns a jsonID of an type-filled parameterIn JSON object from a given list.

param paramList:

semicolon separated list of result and input parameters in the form result_type;param1_type;param2_type…

return:

jsonID of an type-filled parameterIn JSON object

Functions

variable FCALL_SetupParameterIn(string paramList)

FCALL_GetVersion

group FCALL_GetVersion

Functions

string FCALL_GetVersion(variable ignoreErr = defaultValue)

Output version information useful for issue reports.

Parameters:

ignoreErr – [optional, default 0] set to ignore runtime errors

FCALL_Load

group FCALL_Load

Loads library from path.

param path:

string with path to library

return:

library handle string

Functions

string FCALL_Load(string path)

FCALL_Free

group FCALL_Free

Free library.

param libHandle:

library handle string

Functions

variable FCALL_Free(string libHandle)

FCALL_Call

group FCALL_Call

Calls an external library function and returns the result as JSON. Aborts execution with a printed message, if the library call failed.

param libHandle:

library handle string

param functionName:

name of function that is called

param jsonIDParameter:

jsonID of input parameters

return:

jsonID of returned parameters

Functions

variable FCALL_Call(string libHandle, string functionName, variable jsonIDParameter)

FCALL Error Constants

group FCALL_ERROR_CODES

Variables

const double FCALL_ERROR_OLD_IGOR = 10001
const double FCALL_ERROR_UNHANDLED_CPP_EXCEPTION = 10002
const double FCALL_ERROR_CPP_EXCEPTION = 10003
const double FCALL_ERROR_REF_VAR_DIFF_TYPE = 10004
const double FCALL_ERROR_LOADLIBRARY_FAILED = 10005
const double FCALL_ERROR_LIBHANDLE_FAILED = 10006
const double FCALL_ERROR_FREELIBRARY_FAILED = 10007
const double FCALL_ERROR_FREEMEMORY_FAILED = 10008
const double FCALL_ERROR_GETPROCA_FAILED = 10009
const double FCALL_ERROR_GETCINDEX_FAILED = 10010
const double FCALL_ERROR_PARSE_FAILED = 10011
const double FCALL_ERROR_PARSE_UNSUPPORTED_PARAM = 10012
const double FCALL_ERROR_ERR_INVALID_INPUT_PARAM = 10013
const double FCALL_ERROR_ERR_ASSERT = 10014
const double FCALL_ERROR_ERR_CONVERT = 10015
const double FCALL_ERROR_ERR_INVALID_TYPE = 10016