API Return Codes

Common Return Codes

All functions accessing NxLib tree items might return an error code from the following list:

NxLibOperationSucceeded

The operation completed successfully. No error occurred.

NxLibInvalidParameters

One, multiple, or a combination of parameters are invalid.

NxLibInternalError

An unknown internal error occurred.

NxLibInitializationNotAllowed

Executing the function would require to implicitly initialize the NxLib, but this is not allowed, because nxLibFinalize was called before.

When the tree access after finalizing is intentional, you can explicitly call nxLibInitialize to initialize the library again.

Function Specific Return Codes

Some functions accessing NxLib tree items return non-default error codes from the following list:

NxLibItemProtected

You tried to write to an item which is access restricted, or cannot be created because the subtree it belongs to is access restricted.

NxLibCouldNotInterpretJsonText

You specified a JSON string which could not be interpreted.

NxLibItemPathInvalid

You specified an invalid path that contains forbidden characters.

NxLibItemInexistent

You tried to access an item that does not exist.

NxLibItemTypeNotCompatible

You tried to read a value of a certain type from an item, but the item is of a different type.

Also returned by nxLibSetJson if the structure of the given JSON value did not match the node it was applied to.

NxLibItemMaximumUniqueCountReached

Returned by nxLibMakeUniqueItem if the maximum number of unique sub items has been reached.

NxLibBufferTooSmall

Returned by nxLibGetBinary if the item could not be copied to the users buffer, because the buffer is too small.

NxLibDebugMessageOverflow

Returned by nxLibGetDebugMessages if the message buffer has overflown and older messages had to be dropped.

NxLibNoDebugData

Returned by nxLibGetDebugMessages if the message buffer is empty.

NxLibCouldNotOpenPort

Returned by nxLibOpenTcpPort if the specified port could not be allocated.

NxLibInvalidBufferSize

Returned by nxLibSetBinary if the buffer size is invalid, e.g. it does match the current node data size.

NxLibNestingLimitReached

Returned by nxLibOpenDebugBlock if the maximum number of open debug blocks has been reached.

NxLibNoOpenProfileBlock

Returned by nxLibCloseDebugBlock if there is no open debug block that could be closed.

NxLibOperationCanceled

Returned from asynchronous watches when a watch gets canceled.

C++ Specific Return Codes

NxLibBufferNotDivisibleByElementSize

You specified a std::vector<T> to the getBinaryData of the NxLibItem class, but the size of the Binary item data is not divisible by sizeof(T).

NxLibExecutionFailed

You used the execute() member method of the NxLibCommand class, but the command execution returned an error. Use the result() member method and access its itmErrorSymbol and itmErrorText items via operator[] to determine the exact nature of the failure.

NxLibRemote Specific Return Codes

NxLibTimeout

The operation timed out, most likely the TCP connection was interrupted.

NxLibNotConnected

The connection to the NxLib instance could not be established or the operation could not be performed, because there is no connection to any NxLib instance.

NxLibMethodInvalid

Communication error.

NxLibBadRequest

Communication error.

NxLibConnectionNotCompatible

Communication error.

NxLibDynamic Specific Return Codes

NxLibLibraryAlreadyLoaded

Returned by nxLibLoadDynamic if the function has been called successfully before, without a subsequent call of nxLibFreeDynamic.

NxLibCouldNotLoadLibrary

Returned by nxLibLoadDynamic if something went wrong calling dlopen/LoadLibrary.

NxLibCouldNotLoadFunction

Returned when an API function call from a dynamically loaded NxLib could not be resolved or if the NxLib has already been unloaded via nxLibFreeDynamic.