Trees | Indices | Help |
|
---|
|
object --+ | list --+ | object --+ | | | mdsdata.Data --+ | apd.List --+ | Connection.GetMany
Build a list of expressions to evaluate
To reduce the number of network transactions between you and the remote system you can use the GetMany class to specify a list of expressions to be evaluated and then send that list to the remote system in one network transation. The remote system will then evaluate all of the expressions and return the answer in one response.
To use the GetMany class you can create an instance using the getMany() method of a Connection instance. You then use the GetMany.append(name,expression[,args]) method to add expressions to the list. Once the list is complete you then use the GetMany.execute() method to execute the expressions on the remote host and retrieve the answers. This will return a dictionary instance with the names assigned to the expressions as the key. Each name will have a dictionary instance containing the result of the execution of the expression. If this dictionary has an 'error' key then its value will be an error string, otherwise the dictionary should have a 'value' key containing the result.
The GetMany instance can be executed multiple times. For instance, if you want to get the same information from many different trees you could use the Connection.openTeee(tree,shot) method between executions of the same GetMany instance.
NOTE: MDSplus can currently only address objects less than 4 gigabytes. Therefore the maximum size of the expression list with arguments and the result dictionary is approximately 4 gigatypes.
Instance Methods | |||
new list |
|
||
None |
|
||
Data |
|
||
Scalar or Array |
|
||
None |
|
||
None |
|
||
Inherited from Inherited from Inherited from Inherited from |
Static Methods | |
Inherited from |
Properties | |
Inherited from Inherited from |
Method Details |
GetMany instance initialization.
|
Append expression to the list.
|
Execute the list. Send the list to the remote server for evaluation and return the answer as a dict instance.
|
Get the result of an expression identified by name from the last invokation of the execute() method.
|
Insert an expression in the list before the one named in the beforename argument.
|
Remove first occurrence of expression identified by its name from the list.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Aug 21 08:55:26 2009 | http://epydoc.sourceforge.net |