Package tacval :: Package runs :: Module runscript :: Class RunItem
[hide private]
[frames] | no frames]

Class RunItem

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        RunItem

A thread to process a single run item

Class Hierarchy for RunItem
Class Hierarchy for RunItem

Instance Methods [hide private]
 
__init__(self, parent, cond, command)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
run(self)
threads run method
source code
 
run_command(self)
do selfs command
source code
tuple(str,boolean)
parse_str_bool(self, c)
parse a str containing a str and boolean equivalent
source code
tuple(int,boolean)
parse_int_bool(self, c)
parse a str containing a int and boolean
source code
tuple(str)
parse_heat_command(self, c)
parse a HEAT command
source code
tuple(str)
parse_for_command(self, c)
parse a FOR command
source code
 
wait_statement(self, wtime)
sleep for a specified time
source code
 
if_statement(self) source code
 
log_statement(self, msg) source code
 
for_statement(self, start, lim, step, command) source code
 
valve_statement(self, valve_name, open_close)
execute a valve statement send control to parent ie extractionlinemanager
source code
 
heat_statement(self, args)
execute a heat statement send control to parent ie extractionlinemanager
source code
 
pump_statement(self, value, on_off) source code
 
write_statement(self, gauge_name, path) source code

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, join, setDaemon, setName, start

Inherited from threading.Thread (private): _set_daemon

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]
  cond = Condition
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, cond, command)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

run(self)

source code 
  1. threads run method
  2. aquires the condition
  3. runs selfs command
  4. notifyall and release the condition

Call Graph for run
Call Graph for run

Overrides: threading.Thread.run

run_command(self)

source code 

do selfs command

available commands:

   FOR, PRINT, LOG, WAIT, VALVE, PUMP, WRITE, HEAT

Call Graph for run_command
Call Graph for run_command

parse_str_bool(self, c)

source code 

parse a str containing a str and boolean equivalent

Parameters:
  • c (str) - str with a str and boolean equivalent i.e. on
Returns: tuple(str,boolean)
a tuple containing str and boolean

Call Graph for parse_str_bool
Call Graph for parse_str_bool

parse_int_bool(self, c)

source code 

parse a str containing a int and boolean

Parameters:
  • c (str) - str with a int and boolean equivalent i.e. on
Returns: tuple(int,boolean)
a tuple containing int and boolean

parse_heat_command(self, c)

source code 

parse a HEAT command

Parameters:
  • c (str) - command
Returns: tuple(str)
a tuple containing the command split by ,

parse_for_command(self, c)

source code 

parse a FOR command

Parameters:
  • c (str) - command
Returns: tuple(str)
a tuple containing the command split by ,

wait_statement(self, wtime)

source code 

sleep for a specified time

Parameters:
  • wtime (float) - amount of time to sleep in secs

valve_statement(self, valve_name, open_close)

source code 

execute a valve statement send control to parent ie extractionlinemanager

Parameters:
  • valve_name (str) - id of the valve
  • open_close (boolean) - True to open, False to close valve

heat_statement(self, args)

source code 

execute a heat statement send control to parent ie extractionlinemanager

Parameters:
  • args (tuple) - power in watts, amount of time in secs to hold power, ramp rate