Package tacval :: Package monitors :: Module system_monitor :: Class SystemMonitor
[hide private]
[frames] | no frames]

Class SystemMonitor

source code

enthought.traits.api.HasTraits --+
                                 |
                                SystemMonitor

Monitors the system and takes action if there is a problem

Class Hierarchy for SystemMonitor
Class Hierarchy for SystemMonitor

Instance Methods [hide private]
 
__init__(self) source code
 
traits_view(self) source code
 
_load_criteria_map(self, setup_file=None)
load the setup file and parse in the criteria.
source code
 
_load_thread_map(self)
for each criterion create a empty dictionary entry
source code
 
_pressure_changed(self, object, name, old, new)
Handler for changes to any of the GaugeManager's gauges pressures
source code
 
record_error(self, msg)
record an error
source code
 
raise_unhandled_error(self) source code
 
_power_cycle(self) source code
 
error(self, m, n, requery=False) source code
 
check_pressure_duration(self, gauge) source code
 
check_pressure(self, gauge) source code
Class Variables [hide private]
  errors = List()
  open = False
  test = Button
  error_event = Bool(False)
  gauge_manager = Instance(GaugeManager)
Method Details [hide private]

_load_criteria_map(self, setup_file=None)

source code 

load the setup file and parse in the criteria. create a dictionary of criteria self.criteria_map

Example System Monitor setupfile:

   #gauge name, criterion
   gauge0,>50
   gauge1,>50
   gauge2,>50

the system monitor with trip when are gauge pressure exceeds (or the opposite of exceeds) the criterion.

Parameters:
  • setup_file (str) - absolute path of the setup file

Note: there is no established opposite of exceeds

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

source code 

Handler for changes to any of the GaugeManager's gauges pressures

Parameters:
  • object (BaseGauge) - a gauge object
  • name (str) - trait name
  • old (str) - the previous value
  • new (str) - the new value

record_error(self, msg)

source code 

record an error

Parameters:
  • msg (str) - an error message