def __init__(self): self.__alarm_queue = Queue() self.__current_thread = None self.__lock = Lock() self._init_default_attribute_values() Client.__init__(self) return
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
def __init__(self): Client.__init__(self) self.debug = 0 self.node = None self.h_node = None self.sid = None self.old_alarms = []
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
def stop(self): self.__lock.acquire() try: self.unregister_event(NewAlarmsEvent) self.__running = 0 finally: self.__lock.release() Client.stop(self)
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
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
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
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())
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
def start(self): self._history_client = self.parent.get_child('History Client') Client.start(self)
def stop(self): Client.stop(self) if self.sid: scheduler.cancel(self.sid)
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)
def __init__(self, cpc_uhp_node): Client.__init__(self) self._cpc_uhp_node = cpc_uhp_node self._thread = None self._go = 1 return
def configuration(self): config = Client.configuration(self) get_attribute(self, "node", config) if self.debug: get_attribute(self, "generatebogus", config) return config
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)
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)
def configuration(self): config = Client.configuration(self) get_attribute(self, 'node', config) return config
def start(self): Client.start(self) self._thread = Thread(None, self._poll_alarms) self._go = 1 self._thread.start() return
def configuration(self): config = Client.configuration(self) get_attribute(self, 'period', config, float) return config
def configure(self, config): set_attribute(self, 'period', 60.0, config, float) Client.configure(self, config)
def stop(self): self.unregister_event(NewAlarmsEvent) Client.stop(self) self.__log = None self.__log_configured = 0
def configuration(self): config = Client.configuration(self) get_attribute(self,'minimum_size',config,str) get_attribute(self,'maximum_size',config,str) return config
def configure(self, config): set_attribute(self, "node", "/interfaces/com1/tracer100", config) set_attribute(self, "generatebogus", 0, config, as_boolean) Client.configure(self, config)
def __init__(self): self.__log = None self.__log_configured = 0 Client.__init__(self)
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)
def configure(self, config): set_attribute(self, 'node', '/interfaces/com1/tracer100', config) set_attribute(self, 'generatebogus', 0, config, as_boolean) Client.configure(self, config)
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)
def configuration(self): config = Client.configuration(self) get_attribute(self, 'node', config) if self.debug: get_attribute(self, 'generatebogus', config) return config
def configuration(self): config = Client.configuration(self) get_attribute(self,'node',config) return config
def start(self): Client.start(self) self.h_node = as_node(self.node) self.sid = scheduler.after(15, self.poll_alarms)
def configure(self,config): set_attribute(self,'minimum_size',100,config,int) set_attribute(self,'maximum_size',200,config,int) Client.configure(self,config)