Esempio n. 1
0
 def __init__(self):
     self.__alarm_queue = Queue()
     self.__current_thread = None
     self.__lock = Lock()
     self._init_default_attribute_values()
     Client.__init__(self)
     return
Esempio n. 2
0
 def __init__(self):
     self.__alarm_queue = Queue()
     self.__current_thread = None
     self.__lock = Lock()
     self._init_default_attribute_values()
     Client.__init__(self)
     return
Esempio n. 3
0
 def configure(self,config):
     Client.configure(self,config)
     set_attribute(self,'batch_mode', self._batch_mode_default, config, int)
     set_attribute(self,'host', self._host_default, config, str)
     set_attribute(self,'port', self._port_default, config, int)
     set_attribute(self,'timeout', self._timeout_default, config, int)
     return
Esempio n. 4
0
 def __init__(self):
     Client.__init__(self)
     self.debug = 0
     self.node = None
     self.h_node = None
     self.sid = None
     self.old_alarms = []
Esempio n. 5
0
 def __init__(self):
    Client.__init__(self)
    self.debug = 0
    self.node = None
    self.h_node = None
    self.sid = None
    self.old_alarms = []
Esempio n. 6
0
 def configure(self, config):
     Client.configure(self, config)
     set_attribute(self, 'batch_mode', self._batch_mode_default, config,
                   int)
     set_attribute(self, 'host', self._host_default, config, str)
     set_attribute(self, 'port', self._port_default, config, int)
     set_attribute(self, 'timeout', self._timeout_default, config, int)
     return
Esempio n. 7
0
 def stop(self):
     self.__lock.acquire()
     try:
         self.unregister_event(NewAlarmsEvent)
         self.__running = 0
     finally:
         self.__lock.release()
     Client.stop(self)
Esempio n. 8
0
 def stop(self):
     self.__lock.acquire()
     try:
         self.unregister_event(NewAlarmsEvent)
         self.__running = 0
     finally:
         self.__lock.release()
     Client.stop(self)
Esempio n. 9
0
 def start(self):
     self.__lock.acquire()
     try:
         self.__running = 1
         self.register_event(NewAlarmsEvent,self._new_alarms)
     finally:
         self.__lock.release()
     Client.start(self)
     self.debug = 1
Esempio n. 10
0
 def start(self):
     self.__lock.acquire()
     try:
         self.__running = 1
         self.register_event(NewAlarmsEvent, self._new_alarms)
     finally:
         self.__lock.release()
     Client.start(self)
     self.debug = 1
Esempio n. 11
0
 def stop(self):
    self._go = 0
    timeout = 30.0
    self._thread.join(timeout)
    if self._thread.isAlive():
       msglog.log('mpx',msglog.types.ERR,'%s failed to terminate its ' \
                  '_poll_alarms thread within %s sec.' % (as_node_url(self),timeout))
    Client.stop(self)
    return
Esempio n. 12
0
 def __init__(self):
     Client.__init__(self)
     self.debug = 0
     self.node = None
     self.h_node = None
     self.h_alarms = None
     self.generatebogus = 0
     self.sid = None
     # Seed the random number generator
     self.rand = Random(os.getpid())
Esempio n. 13
0
 def __init__(self):
     Client.__init__(self)
     self.debug = 0
     self.node = None
     self.h_node = None
     self.h_alarms = None
     self.generatebogus = 0
     self.sid = None
     # Seed the random number generator
     self.rand = Random(os.getpid())
Esempio n. 14
0
 def configuration(self):
     config = Client.configuration(self)
     get_attribute(self, 'batch_mode', config, int)
     get_attribute(self, 'host', config, str)
     get_attribute(self, 'port', config, int)
     get_attribute(self, 'timeout', config, int)
     return config
Esempio n. 15
0
 def configuration(self):
     config = Client.configuration(self)
     get_attribute(self, 'batch_mode', config, int)
     get_attribute(self, 'host', config, str)
     get_attribute(self, 'port', config, int)
     get_attribute(self, 'timeout', config, int)
     return config
Esempio n. 16
0
 def start(self):
     self._history_client = self.parent.get_child('History Client')
     Client.start(self)
Esempio n. 17
0
 def stop(self):
     Client.stop(self)
     if self.sid:
         scheduler.cancel(self.sid)
Esempio n. 18
0
 def start(self):
     Client.start(self)
     self.h_node = as_node(self.node)
     self.h_alarms = self.h_node.get_child('tracer_alarm_points')
     self.sid = scheduler.after(15, self.poll_alarms)
Esempio n. 19
0
 def __init__(self, cpc_uhp_node):
    Client.__init__(self)
    self._cpc_uhp_node = cpc_uhp_node
    self._thread = None
    self._go = 1
    return
Esempio n. 20
0
 def configuration(self):
     config = Client.configuration(self)
     get_attribute(self, "node", config)
     if self.debug:
         get_attribute(self, "generatebogus", config)
     return config
Esempio n. 21
0
 def stop(self):
     Client.stop(self)
     if self.sid:
         scheduler.cancel(self.sid)
Esempio n. 22
0
 def configure(self,config):
    if debug:
       print 'In BACnetClient.configure with %s.' % str(config)
    set_attribute(self,'node','/interfaces/eth0/BACnetIP/BCU-01 (1)',config)
    Client.configure(self,config)
Esempio n. 23
0
 def configure(self, config):
     if debug:
         print 'In BACnetClient.configure with %s.' % str(config)
     set_attribute(self, 'node', '/interfaces/eth0/BACnetIP/BCU-01 (1)',
                   config)
     Client.configure(self, config)
Esempio n. 24
0
 def configuration(self):
     config = Client.configuration(self)
     get_attribute(self, 'node', config)
     return config
Esempio n. 25
0
 def start(self):
     self._history_client = self.parent.get_child('History Client')
     Client.start(self)
Esempio n. 26
0
 def start(self):
    Client.start(self)
    self._thread = Thread(None, self._poll_alarms)
    self._go = 1
    self._thread.start()
    return
Esempio n. 27
0
 def configuration(self):
    config = Client.configuration(self)
    get_attribute(self, 'period', config, float)
    return config
Esempio n. 28
0
 def configure(self, config):
    set_attribute(self, 'period', 60.0, config, float)
    Client.configure(self, config)
Esempio n. 29
0
 def stop(self):
     self.unregister_event(NewAlarmsEvent)
     Client.stop(self)
     self.__log = None
     self.__log_configured = 0
Esempio n. 30
0
 def configuration(self):
     config = Client.configuration(self)
     get_attribute(self,'minimum_size',config,str)
     get_attribute(self,'maximum_size',config,str)
     return config
Esempio n. 31
0
 def configure(self, config):
     set_attribute(self, "node", "/interfaces/com1/tracer100", config)
     set_attribute(self, "generatebogus", 0, config, as_boolean)
     Client.configure(self, config)
Esempio n. 32
0
 def __init__(self):
     self.__log = None
     self.__log_configured = 0
     Client.__init__(self)
Esempio n. 33
0
 def start(self):
     Client.start(self)
     self.h_node = as_node(self.node)
     self.h_alarms = self.h_node.get_child("tracer_alarm_points")
     self.sid = scheduler.after(15, self.poll_alarms)
Esempio n. 34
0
 def configure(self, config):
     set_attribute(self, 'node', '/interfaces/com1/tracer100', config)
     set_attribute(self, 'generatebogus', 0, config, as_boolean)
     Client.configure(self, config)
Esempio n. 35
0
 def start(self):
     self.__log_configured = 0
     self.__log = TrimmingLog(self.parent.name + '_alarm_history')
     self.register_event(NewAlarmsEvent,self._log_alarms)
     Client.start(self)
Esempio n. 36
0
 def configuration(self):
     config = Client.configuration(self)
     get_attribute(self, 'node', config)
     if self.debug:
         get_attribute(self, 'generatebogus', config)
     return config
Esempio n. 37
0
 def configuration(self):
    config = Client.configuration(self)
    get_attribute(self,'node',config)
    return config
Esempio n. 38
0
 def start(self):
     Client.start(self)
     self.h_node = as_node(self.node)
     self.sid = scheduler.after(15, self.poll_alarms)
Esempio n. 39
0
 def start(self):
    Client.start(self)
    self.h_node = as_node(self.node)
    self.sid = scheduler.after(15, self.poll_alarms)
Esempio n. 40
0
 def configure(self,config):
     set_attribute(self,'minimum_size',100,config,int)
     set_attribute(self,'maximum_size',200,config,int)
     Client.configure(self,config)