Package MDSplus :: Module connection :: Class Connection :: Class PutMany
[frames] | no frames]

Class PutMany

source code

  object --+        
           |        
        list --+    
               |    
  object --+   |    
           |   |    
mdsdata.Data --+    
               |    
        apd.List --+
                   |
                  Connection.PutMany

Build list of put instructions.

Instance Methods
new list
__init__(self, value=None, connection=None)
Instance initialization
source code
None
append(self, node, exp, *args)
Append node data information
source code
str
get(self, node)
Return the status of the put for this node.
source code
Data
execute(self)
Execute the PutMany by sending the instructions to the remote server.
source code
None
insert(self, beforenode, node, exp, *args)
Insert put data before node in list specified by beforenode
source code
None
remove(self, node)
Remove the node from the list.
source code

Inherited from apd.List: __str__, toApd

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, count, extend, index, pop, reverse, sort

Inherited from mdsdata.Data: __abs__, __and__, __div__, __float__, __floordiv__, __int__, __invert__, __long__, __lshift__, __mod__, __neg__, __nonzero__, __or__, __pos__, __radd__, __rdiv__, __rfloordiv__, __rlshift__, __rmod__, __ror__, __rrshift__, __rshift__, __rsub__, __rxor__, __sub__, __xor__, bool, data, decompile, dim_of, evaluate, getByte, getByteArray, getDimensionAt, getDouble, getError, getFloat, getHelp, getInt, getIntArray, getLong, getLongArray, getShape, getShort, getShortArray, getString, getUnits, mayHaveChanged, pop_dollar_value, push_dollar_value, raw_of, serialize, setError, setHelp, setTdiVar, setUnits, sind, units_of, value_of

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Static Methods

Inherited from mdsdata.Data: compile, deserialize, getTdiVar

Properties

Inherited from mdsdata.Data: descriptor, error, help, units, validation

Inherited from object: __class__

Method Details

__init__(self, value=None, connection=None)
(Constructor)

source code 

Instance initialization

Returns: new list
Raises:
  • TypeError - Raised if attempting to create an instance of Data
Overrides: object.__init__

append(self, node, exp, *args)

source code 

Append node data information

Parameters:
  • node (str) - Node name where to store the data
  • exp (str) - TDI expression to be stored in node with optional placeholders for arguments
  • args (Data) - optional arguments to replace placeholders in expression
Returns: None
Overrides: list.append

get(self, node)

source code 

Return the status of the put for this node. Anything other than 'Success' will raise an exception.

Parameters:
  • node (str) - Node name. Must match exactly the node name used in the append() or insert() methods.
Returns: str

execute(self)

source code 

Execute the PutMany by sending the instructions to the remote server. The remote server will attempt to put the data in each of the nodes listed and after completion return a dict instance of the status of each put.

Returns: Data
dict instance with status of each put. The key of the result will be the node name.
Overrides: mdsdata.Data.execute

insert(self, beforenode, node, exp, *args)

source code 

Insert put data before node in list specified by beforenode

Parameters:
  • beforenode (str) - Name of node in list to insert this put data information.
  • node (str) - Node name to put data into
  • exp (str) - TDI expression to store in node with optional placeholders for arguments
  • args (Data) - Optional arguments to replace placeholders in expression
Returns: None
Overrides: list.insert

remove(self, node)

source code 

Remove the node from the list.

Parameters:
  • node (str) - node name to remove from list. Must match exactly the node name used in the append() or insert() methods.
Returns: None
Overrides: list.remove