Package tacval :: Package managers :: Module gauge_manager :: Class GaugeManager
[hide private]
[frames] | no frames]

Class GaugeManager

source code

                    enthought.traits.api.HasTraits --+    
                                                     |    
base_extraction_line_manager.BaseExtractionLineManager --+
                                                         |
                                                        GaugeManager

This is the controller of gauges.

all gauge commands should be sent through the controllers scan queue

Class Hierarchy for GaugeManager
Class Hierarchy for GaugeManager

Instance Methods [hide private]
 
__init__(self, *args, **kw)
create the queue
source code
boolean
kill(self)
Returns: True to confirm kill, False to cancel
source code
 
get_gauge_by_name(self, name)
get the gauge by name
source code
 
setup(self, setup_file=None, auto_start=True)
set up the gauge manager by loading a setup file
source code
 
load_gauges(self)
loop thru the gauge list
source code
 
start_scan(self)
spans a new ScanThread
source code
 
repopulate(self)
repopulates by reloading the queue with commands
source code
 
do(self, com)
executes a command sent by the scan thread
source code
 
gauge_power(self, gauge, onoff)
method for toggling gauge power
source code
 
_add_gauge(self, name, address, type='ION', desc='')
private method to add gauge to the gauge list
source code
 
_validate_command(self, c) source code
tuple
_parse_command(self, c)
private method to parse scanthread commands
source code
 
ilistener(self, object, name, old, new)
handler for BaseGauge.identify
source code
 
plistener(self, object, name, old, new)
Handler for BaseGauge.flag - provides a event for listeners listening for pressure changes
source code
 
stlistener(self, object, name, old, new)
Handler for changes to BaseGauge.state
source code
 
dlistener(self, object, name, old, new)
Handler for BaseGauge.show_data
source code
LEDEditor
LED_pressure_indicator_factory(self)
factory to add a LED widget to the view
source code
View
traits_view(self)
default view for this class
source code
Class Variables [hide private]
  gauges = List(BaseGauge)
  name = Str
  pressure = Str
  selected = Any
    Inherited from base_extraction_line_manager.BaseExtractionLineManager
  extraction_line = Any
Method Details [hide private]

__init__(self, *args, **kw)
(Constructor)

source code 

create the queue

Overrides: base_extraction_line_manager.BaseExtractionLineManager.__init__

kill(self)

source code 
Returns: boolean
True to confirm kill, False to cancel
Overrides: base_extraction_line_manager.BaseExtractionLineManager.kill
(inherited documentation)

get_gauge_by_name(self, name)

source code 

get the gauge by name

Parameters:
  • name (str) - str name of the gauge

setup(self, setup_file=None, auto_start=True)

source code 

set up the gauge manager by loading a setup file

  1. load a setup file and parse it
  2. add/load gauges
  3. start scan
Parameters:
  • setup_file (None) - absolute path to the setup file. If None a default path is used build from ghome

load_gauges(self)

source code 

loop thru the gauge list

  • open the gauges serial connection
  • setup its setpoints
  • add setpoint commands to queue

do(self, com)

source code 

executes a command sent by the scan thread

Parameters:
  • com (str) - command to do

gauge_power(self, gauge, onoff)

source code 

method for toggling gauge power

this is only relevant for ION gauges

Parameters:
  • gauge (BaseGauge) - A gauge object
  • onoff (boolean) - True to turn on, False to turn off

_add_gauge(self, name, address, type='ION', desc='')

source code 

private method to add gauge to the gauge list

Parameters:
  • name (str) - name of gauge
  • address (str) - 0-255
  • type (str ION) - type of gauge ION, MP, MP3
  • desc (str) - basic description of the gauge

_parse_command(self, c)

source code 

private method to parse scanthread commands

Parameters:
  • c (str) - command to parse
Returns: tuple
name, id, command, value

ilistener(self, object, name, old, new)

source code 

handler for BaseGauge.identify

adds command to queue

Parameters:
  • object (BaseGauge) - a gauge object
  • name (str) - trait name
  • old (boolean) - the previous value
  • new (boolean) - the new value
Decorators:
  • @on_trait_change('gauges.identify')

plistener(self, object, name, old, new)

source code 

Handler for BaseGauge.flag - provides a event for listeners listening for pressure changes

  1. update the gauge managers led editor with the new pressure
Parameters:
  • object (BaseGauge) - a gauge object
  • name (str) - trait name
  • old (boolean) - the previous value
  • new (boolean) - the new value
Decorators:
  • @on_trait_change('gauges.flag')

stlistener(self, object, name, old, new)

source code 

Handler for changes to BaseGauge.state

Parameters:
  • object (BaseGauge) - a gauge object
  • name (str) - trait name
  • old (boolean) - the previous value
  • new (boolean) - the new value
Decorators:
  • @on_trait_change('gauges.state')

dlistener(self, object, name, old, new)

source code 

Handler for BaseGauge.show_data

show the gauges data buffer

Parameters:
  • object (BaseGauge) - a gauge object
  • name (str) - trait name
  • old (boolean) - the previous value
  • new (boolean) - the new value
Decorators:
  • @on_trait_change('gauges.show_data')

LED_pressure_indicator_factory(self)

source code 

factory to add a LED widget to the view

Returns: LEDEditor
VGroup

traits_view(self)

source code 

default view for this class

Returns: View
Traits View