Meta Information Retrieval

nxLibGetType

int32_t nxLibGetType(int32_t *result, const char *itemPath)

Retrieves the item type a tree item. NxLibItemTypeInvalid - An error occurred, refer to result for further information.

Return

The type identifier of the basic type of the item.

Parameters
  • result: A pointer to a variable for the error code of the operation.

  • itemPath: The path of the item to access.

NxLibItemTypeNull - The item is of type Null.

NxLibItemTypeNumber - The item is a Number. This can be an integer or floating point value.

NxLibItemTypeString - The item is a String.

NxLibItemTypeBool - The item is a Boolean value.

NxLibItemTypeArray - The item is an Array. The number of array elements can be queried with nxLibGetCount(). The array can be empty.

NxLibItemTypeObject - The item is an Object. The number of subitems can be queried with nxLibGetCount(). The object can be empty.

nxLibGetCount

int32_t nxLibGetCount(int32_t *result, const char *itemPath)

Retrieves the number of subitems of an Object or the number of elements of an Array item. In case of a Binary item its data size in bytes is returned.

Return

The number of subitems.

Parameters
  • result: A pointer to a variable for the error code of the operation.

  • itemPath: The path of the item to access.

nxLibGetName

const char *nxLibGetName(int32_t *result, const char *itemPath)

Retrieves string of an item. This function is intended to be used to enumerate subitems of an Object. The subitems can be accessed by the index notation (see here), then the corresponding names can be queried with nxLibGetName.

Return

The string name of the item, without its path.

Parameters
  • result: A pointer to a variable for the error code of the operation.

  • itemPath: The path of the item to access.

nxLibGetBinaryInfo

void nxLibGetBinaryInfo(int32_t *result, const char *itemPath, int32_t *width, int32_t *height, int32_t *channelCount, int32_t *bytesPerElement, int32_t *isFloat, double *timestamp)

Retrieves meta data of a Binary item.

Note

The entire size of the binary blob is width*height*channelCount*bytesPerElement. A 24bit RGB image of VGA resolution would have width == 640, height == 480, channelCount == 3, bytesPerElement == 1 and isFloat == NXLIBFALSE.

Parameters
  • result: A pointer to a variable for the error code of the operation.

  • itemPath: The path of the item to access.

  • width: The width of the array (consecutive elements in memory).

  • height: The height of the array (number of rows of width*channelCount elements)

  • channelCount: Number of channels for a single item.

  • bytesPerElement: Size in bytes of a single channel value of an item.

  • isFloat: Specifies whether the element data type is a floating point type.

  • timestamp: The current timestamp of the binary blob queried.