Meta Information Retrieval¶
nxLibGetType¶
-
int32_t
nxLibGetType
(int32_t *result, const char *itemPath)¶ Retrieves the item type a tree item.
- 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.
- Return Value
NxLibItemTypeInvalid
: An error occurred, refer toresult
for further information.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 withnxLibGetCount()
. The array can be empty.NxLibItemTypeObject
: The item is an Object. The number of children can be queried withnxLibGetCount()
. 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. Please refer to the string type description for information about usage restrictions applying to the returned pointer.
- 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
bytes. For example a 24bit RGB image of VGA resolution would havewidth
=640
,height
=480
,channelCount
=3
,bytesPerElement
=1
andisFloat
=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 ofwidth
*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.