Other

nxLibTranslateReturnCode

char const *nxLibTranslateReturnCode(int32_t returnCode)

Retrieves a string description for an API return code.

Return

A pointer to a string description of the return code or 0, if an invalid return code was specified.

Parameters
  • returnCode: The return code to convert to a text string

nxLibGetDebugMessages

std::string nxLibGetDebugMessages()

Retrieves debug messages. This can also be done remotely from NxLibRemote.

Note

By calling this function the debug buffer will be fully cleared and the debug information can no longer be retrieved with nxLibGetDebugBuffer.

Note

Calling this function will temporarily lock all debug ring buffers and thus block all NxLib threads which are trying to push debug information onto their buffer. The user should therefore choose a point in time when NxLib is not performing time critical computations for his application to retrieve debug information.

Return

The debug messages from all threads separated by the newline character (\n).

nxLibGetDebugBuffer

int32_t nxLibGetDebugBuffer(int32_t *result, void *destinationBuffer, int32_t bufferSize, int32_t *bytesRemaining, int32_t clearRead)

Retrieves debug information in a binary format which can be read by NxProfiler. This can also be done remotely from NxLibRemote.

Note

Calling this function will temporarily lock all debug ring buffers and thus block all NxLib threads which are trying to push debug information onto their buffer. The user should therefore choose a point in time when NxLib is not performing time critical computations for his application to retrieve debug information.

Parameters
  • result: The error code of the operation. If the debug buffer could not hold all streamed debug information, the error code NxLibDebugMessageOverflow will be returned.

  • destinationBuffer: Pointer to an allocated memory block.

  • bufferSize: Size of the destination buffer.

  • bytesRemaining: Pointer to an integer. Will be set to the number of remaining bytes in the debug buffer after the read operation.

  • clearRead: When set to true the operation will also remove the retrieved content from the debug buffer.

template<typename T>
void nxLibGetDebugBuffer(std::vector<T> &data, bool clearRead = true, bool *overflow = 0)

Retrieves debug information in a binary format which can be read by NxProfiler. This can also be done remotely from NxLibRemote.

Note

Calling this function will temporarily lock all debug ring buffers and thus block all NxLib threads which are trying to push debug information onto their buffer. The user should therefore choose a point in time when NxLib is not performing time critical computations for his application to retrieve debug information.

Template Parameters
  • T: Element type of std::vector.

Parameters
  • data: Vector to hold the retrieved debug information. The vector will be automatically resized to hold all available debug information.

  • clearRead: When set to true the operation will also remove the retrieved content from the debug buffer.

  • overflow: Indicates if the buffer has overflown since the last read operation and older debug information has been lost.