Item Value Retrieval¶
nxLibGetJson¶
-
const char *
nxLibGetJson
(int32_t *result, const char *itemPath, int32_t prettyPrint, int32_t numberPrecision, int32_t scientificNumberFormat)¶ Retrieves an item value or an entire subtree in JSON represetation.
- Return
A Json string representing the item value or subtree.
- Parameters
result
: A pointer to a variable for the error code tof the operationitemPath
: The path of the item to accessprettyPrint
: Specify true here to format the resulting string with line breaks and tabs.numberPrecision
: The floating point precision of the returned numbers.scientificNumberFormat
: Specifies whether to use scientific notation for all numbers.
nxLibGetJsonMeta¶
-
const char *
nxLibGetJsonMeta
(int32_t *result, const char *itemPath, int32_t numLevels, int32_t prettyPrint, int32_t numberPrecision, int32_t scientificNumberFormat)¶ Retrieves an item value or an entire subtree in JSON represetation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.
- Return
A JSON string representing the item value or subtree including each item’s metadata.
- Parameters
result
: A pointer to a variable for the error code of the operationitemPath
: The path of the item to access.numLevels
: The depth of the returned subtree. Nodes in lower levels will be omitted.prettyPrint
: Specify true here to format the resulting string with line breaks and tabs.numberPrecision
: The floating point precision of the returned numbers.scientificNumberFormat
: Specifies whether to use scientific notation for all numbers.
nxLibGetInt¶
-
int32_t
nxLibGetInt
(int32_t *result, const char *itemPath)¶ Retrieves the integer value of a Number item.
- Return
The integer value of the item. If the item’s number value was a floating point number, the rounded value will be returned.
- Parameters
result
: A pointer to a variable for the error code of the operationitemPath
: The path of the item to access.
nxLibGetDouble¶
-
double
nxLibGetDouble
(int32_t *result, const char *itemPath)¶ Retrieves the floating point value of a Number item.
- Return
The floating point value 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.
nxLibGetBool¶
-
int32_t
nxLibGetBool
(int32_t *result, const char *itemPath)¶ Retrieves the value of a Boolean item.
- Return
The boolean value 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.
nxLibGetString¶
-
const char *
nxLibGetString
(int32_t *result, const char *itemPath)¶ Retrieves the value of a String item.
- Return
The string value of the item. Please refer to the string type description here for the usage restrictions applying to the returned character pointer.
- Parameters
result
: A pointer to a variable for the error code of the operation.itemPath
: The path of the item to access.
nxLibGetBinary¶
-
void
nxLibGetBinary
(int32_t *result, const char *itemPath, void *destinationBuffer, int32_t bufferSize, int32_t *bytesCopied, double *timestamp)¶ Retrieves data of a Binary item.
- Parameters
result
: A pointer to a variable for the error code of the operation.itemPath
: The path of the item to access.destinationBuffer
: A pointer to the memory, where the item content should be copied.bufferSize
: The size of the fivne buffer in bytes.bytesCopied
: A pointer to an integer. The variable will be filled with the actial number of bytes written to the buffertimestamp
: The current timestamp of the binary blob queried.