API Return CodesΒΆ

All function accessing the NxLib tree items return error codes from the following list:

NxLibOperationSucceeded

The operation completed successfully. No error occurred.

NxLibCannotCreateItem

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.

NxLibItemInexistent

The item you tried to access does not exist.

NxLibCouldNotOpenPort

NxLibRemote only: the specified port could not be allocated.

NxLibInternalError

An unknown internal error occurred.

NxLibTimeout

NxLibRemote only: the operation timed out, most likely the TCP connection was interrupted.

NxLibNotConnected

NxLibRemote only: the operation cannot be performed because there is no connection to any NxLib instance.

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.

NxLibBufferTooSmall

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

NxLibBufferNotDivisibleByElementSize

C++ only: 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

C++ only: 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 to determine the exact nature of the failure.

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.

NxLibInvalidBufferSize

Returned by nxLibSetBinary if the buffer size was invalid (e.g. did not match the current node data size).

NxLibMethodInvalid NxLibBadRequest NxLibConnectionNotCompatible

NxLibRemote only: communication error.

NxLibInitializationNotAllowed

Executing a 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.

NxLibNestingLimitReached

Calling nxLibOpenDebugBlock while debug block nesting limit is reached.

NxLibNoOpenProfileBlock

Calling nxLibCloseDebugBlock without an open debug block.