Tree#
- group TreeListing
All parameters and streams are organized in a tree. You can list the whole tree, parts of it or single items using ziAPIListNodes or you may update the tree with nodes of newly connected devices by using ziAPIUpdateDevices.
Defines
-
ZIListNodes_enum_cast(val) val
Typedefs
-
typedef enum ZIListNodes_enum ZIListNodes_enum
Enums
-
enum ZIListNodes_enum
Defines the values of the flags used in ziAPIListNodes.
Values:
-
enumerator ZI_LIST_NODES_ALL = 0x00
Default, return a simple listing of the given node immediate descendants.
-
enumerator ZI_LIST_NODES_RECURSIVE = 0x01
List the nodes recursively.
-
enumerator ZI_LIST_NODES_ABSOLUTE = 0x02
Return absolute paths.
-
enumerator ZI_LIST_NODES_LEAVESONLY = 0x04
Return only leaf nodes, which means the nodes at the outermost level of the tree.
-
enumerator ZI_LIST_NODES_SETTINGSONLY = 0x08
Return only nodes which are marked as setting.
-
enumerator ZI_LIST_NODES_STREAMINGONLY = 0x10
Return only streaming nodes (nodes that can be pushed from the device at a high data rate)
-
enumerator ZI_LIST_NODES_SUBSCRIBEDONLY = 0x20
Return only nodes that are subscribed to in the API session.
-
enumerator ZI_LIST_NODES_BASECHANNEL = 0x40
Return only one instance of a node in case of multiple channels.
-
enumerator ZI_LIST_NODES_GETONLY = 0x80
Return only nodes which can be used with the get command.
-
enumerator ZI_LIST_NODES_EXCLUDESTREAMING = 0x100000
Exclude streaming nodes.
-
enumerator ZI_LIST_NODES_EXCLUDEVECTORS = 0x1000000
Exclude node vectors.
-
enumerator ZI_LIST_NODES_ALL = 0x00
Functions
-
ZIResult_enum ziAPIListNodes(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. 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, each element delimited by a newline. 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
See also
ziAPIUpdate
- Parameters:
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 newline-delimited 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.
- Returns:
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.
-
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
See also
ziAPIUpdate
- Parameters:
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.
- Returns:
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.
Variables
-
const ZIListNodes_enum ZI_LIST_NONE = 0x00#
-
const ZIListNodes_enum ZI_LIST_RECURSIVE = 0x01#
-
const ZIListNodes_enum ZI_LIST_ABSOLUTE = 0x02#
-
const ZIListNodes_enum ZI_LIST_LEAFSONLY = 0x04#
-
const ZIListNodes_enum ZI_LIST_SETTINGSONLY = 0x08#
-
ZIListNodes_enum_cast(val) val