ConnectionDict#
- class ConnectionDict(data: Dict[str, Any], json_info: Dict[str, _NodeInfo])[source]#
Bases:
object
Connection wrapper around a dictionary.
The
NodeTree
expects a connection that complies to the protocolnodetree.Connection
. In order to also support raw dictionaries this class wraps around a python dictionary and exposes the required protocol.- Parameters:
data (Dict[str, Any]) – Dictionary raw path: value
json_info (Dict[str, _NodeInfo]) – JSON information for each path (path: info)
Methods
get
(path, *args, **kwargs)Mirrors the behavior of zhinst.core get command.
getDouble
(path)Mirrors the behavior of zhinst.core getDouble command.
getInt
(path)Mirrors the behavior of zhinst.core getInt command.
getString
(path)Mirrors the behavior of zhinst.core getDouble command.
listNodesJSON
(path, *args, **kwargs)Returns a list of nodes with description found at the specified path.
set
(path[, value])Mirrors the behavior of zhinst.core set command.
setVector
(path[, value])Mirrors the behavior of zhinst.core setVector command.
subscribe
(path)Mirrors the behavior of zhinst.core subscribe command.
unsubscribe
(path)Mirrors the behavior of zhinst.core unsubscribe command.