Defined in File ziAPI.h
ZIResult_enum ziAPIListNodesJSON(ZIConnection conn, const char *path, char *nodes, uint32_t bufferSize, uint32_t flags)#
Returns all child nodes found at the specified path.
This function returns a list of node names found at the specified path, formatted as JSON. The path may contain wildcards so that the returned nodes do not necessarily have to have the same parents. The list is returned in a null-terminated char-buffer. If the maximum length of the buffer (bufferSize) is not sufficient for all elements, nothing will be returned and the return value will be ZIResult_enum::ZI_LENGTH.
See Tree Listing for an example
conn – [in] Pointer to the ZIConnection for which the node names should be retrieved.
path – [in] Path for which all children will be returned. The path may contain wildcard characters.
nodes – [out] Upon call filled with JSON-formatted list of the names of all the children found. The string is zero-terminated.
bufferSize – [in] The length of the buffer used for the nodes output parameter.
flags – [in] A combination of flags (applied bitwise) as defined in ZIListNodes_enum.
ZI_INFO_SUCCESS on success
ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
ZI_ERROR_LENGTH if the path’s length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by bufferSize is too small for all elements
ZI_ERROR_COMMAND on an incorrect answer of the server
ZI_ERROR_SERVER_INTERNAL if an internal error occurred in Data Server
ZI_WARNING_NOTFOUND if the given path could not be resolved
ZI_ERROR_TIMEOUT when communication timed out
Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.