Trees | Index | Help |
|
---|
Package MDSplus :: Module connection :: Class GetMany |
|
object
--+ |Data
--+ |object
--+ | | |list
--+ |List
--+ | 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.Method Summary | |
---|---|
GetMany instance initialization. | |
None |
Append expression to the list. |
Execute the list. | |
Scalar or Array |
Get the result of an expression identified by name from the last invokation of the execute() method. |
None |
Insert an expression in the list before the one named in the beforename argument. |
None |
Remove first occurrence of expression identified by its name from the list. |
Inherited from List | |
string |
Return string representation |
| |
Inherited from list | |
x.__add__(y) <==> x+y | |
x.__contains__(y) <==> y in x | |
x.__delitem__(y) <==> del x[y] | |
Use of negative indices is not supported. | |
x.__eq__(y) <==> x==y | |
x.__ge__(y) <==> x>=y | |
x.__getattribute__('name') <==> x.name | |
x.__getitem__(y) <==> x[y] | |
Use of negative indices is not supported. | |
x.__gt__(y) <==> x>y | |
x.__hash__() <==> hash(x) | |
x.__iadd__(y) <==> x+=y | |
x.__imul__(y) <==> x*=y | |
x.__iter__() <==> iter(x) | |
x.__le__(y) <==> x<=y | |
x.__len__() <==> len(x) | |
x.__lt__(y) <==> x<y | |
x.__mul__(n) <==> x*n | |
x.__ne__(y) <==> x!=y | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__repr__() <==> repr(x) | |
L.__reversed__() -- return a reverse iterator over the list | |
x.__rmul__(n) <==> n*x | |
x.__setitem__(i, y) <==> x[i]=y | |
Use of negative indices is not supported. | |
L.count(value) -> integer -- return number of occurrences of value | |
L.extend(iterable) -- extend list by appending elements from the iterable | |
L.index(value, [start, [stop]]) -> integer -- return first index of value | |
L.pop([index]) -> item -- remove and return item at index (default last) | |
L.reverse() -- reverse *IN PLACE* | |
L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*; cmp(x, y) -> -1, 0, 1 | |
Inherited from Data | |
Data |
Absolute value: x.__abs__() <==> abs(x) |
Data |
And: x.__and__(y) <==> x&y |
Data |
Divide: x.__div__(y) <==> x/y |
Data |
Float: x.__float__() <==> float(x) |
Data |
Floordiv: x.__floordiv__(y) <==> x//y |
int |
Integer: x.__int__() <==> int(x) |
Data |
Binary not: x.__invert__() <==> ~x |
long |
Convert this object to python long |
Data |
Lrft binary shift: x.__lshift__(y) <==> x<<y |
Data |
Modulus: x.__mod__(y) <==> x%y |
Data |
Negation: x.__neg__() <==> -x |
Bool |
Not equal 0: x.__nonzero__() <==> x != 0 |
Data |
Or: x.__or__(y) <==> x|y |
Data |
Unary plus: x.__pos__() <==> +x |
Data |
Reverse add: x.__radd__(y) <==> y+x |
Data |
Reverse divide: x.__rdiv__(y) <==> y/x |
Data |
x.__rfloordiv__(y) <==> y//x |
Data |
Reverse left binary shift: x.__rlshift__(y) <==> y<<x |
Data |
Reverse modulus: x.__rmod__(y) <==> y%x |
Data |
Or: x.__or__(y) <==> x|y |
Data |
Reverse right binary shift: x.__rrshift__(y) <==> y>>x |
Data |
Right binary shift: x.__rshift__(y) <==> x>>y |
Data |
Reverse subtract: x.__rsub__(y) <==> y-x |
Data |
Reverse xor: x.__rxor__(y) <==> y^x |
Data |
Subtract: x.__sub__(y) <==> x-y |
Data |
Xor: x.__xor__(y) <==> x^y |
Bool |
Return boolean |
Bool |
Compare this data with argument |
Data |
Static method (routine in C++) which compiles the expression (via TdiCompile()) and returns the object instance correspondind to the compiled expression. (Static method) |
Scalar,Array |
Return primitimive value of the data. |
string |
Return string representation |
Data |
Return Data from serialized buffer. (Static method) |
Data |
Return dimension of object |
Data |
Return the result of TDI evaluate(this). |
Int8 |
Convert this data into a byte. |
Int8Array |
Convert this data into a byte array. |
Data |
Return dimension of object |
Float64 |
Convert this data into a float64. |
Data |
Get the error field. |
Float32 |
Convert this data into a float32. |
Data |
Returns the result of TDI GET_HELP(this). |
Int32 |
Convert this data into a int. |
Int32Array |
Convert this data into a int array. |
Int64 |
Convert this data into a long. |
Int64Array |
Convert this data into a long array. |
Int32Array |
Get the array dimensions as an integer array. |
Int16 |
Convert this data into a short. |
Int16Array |
Convert this data into a short array. |
String |
Convert this data into a STRING. |
Data |
Get value of tdi public variable (Static method) |
Data |
Return the TDI evaluation of UNITS_OF(this). |
Data |
Return MDSplus data class from value. (Static method) |
Bool |
return true if the represented data could have been changed since the last time this method has been called. |
Data |
Pop $value for expression evaluation |
None |
Set $value for expression evaluation |
Data |
Return raw part of object |
Uint8Array |
Return Uint8Array binary representation. |
None |
Set the Error field for this Data instance. |
None |
Set the Help field for this Data instance. |
Data |
Set tdi public variable with this data |
None |
Set units |
Float32Array |
Return sin() of data assuming data is in degrees |
Data |
Return units part of the object |
Data |
Return value part of object |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value |
Property Summary | |
---|---|
Inherited from Data | |
descriptor | |
error | |
help | |
units | |
validation |
Instance Method Details |
---|
__init__(self,
value=None,
connection=None)
GetMany instance initialization.
|
append(self, name, exp, *args)Append expression to the list.
|
execute(self)Execute the list. Send the list to the remote server for evaluation and return the answer as a dict instance. |
get(self, name)Get the result of an expression identified by name from the last invokation of the execute() method.
|
insert(self, beforename, name, exp, *args)Insert an expression in the list before the one named in the beforename argument.
|
remove(self, name)Remove first occurrence of expression identified by its name from the list.
|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed Aug 18 13:35:31 2010 | http://epydoc.sf.net |