def start(self): #only if we are an active point (not simply a parent node) if self.lan_address != 0 and self.id_number != 0: #do we have a _line_handler and therefore want get/set if self._line_handler is None: #preconfigured instead of autodiscovered self._line_handler = self.get_line_handler() if self._line_handler: self.get = self._get self.get_result = self._get_result self.set = self._set self.has_cov = self._has_cov self.event_subscribe = self._event_subscribe self.event_unsubscribe = self._event_unsubscribe self._line_handler_up = self.__line_handler_up try: if not self.has_child("_status"): self.__status = self.Status(self) self.__status.configure({ 'name': '_status', 'parent': self }) except: msglog.exception() if self.is_bound_proxy(): self._line_handler.register_bound_proxy(self) CompositeNode.start(self) ActiveProxyAbstractClass.start(self) return
def start(self): #only if we are an active point (not simply a parent node) if self.lan_address != 0 and self.id_number != 0: #do we have a _line_handler and therefore want get/set if self._line_handler is None: #preconfigured instead of autodiscovered self._line_handler = self.get_line_handler() if self._line_handler: self.get = self._get self.get_result = self._get_result self.set = self._set self.has_cov = self._has_cov self.event_subscribe = self._event_subscribe self.event_unsubscribe = self._event_unsubscribe self._line_handler_up = self.__line_handler_up try: if not self.has_child("_status"): self.__status = self.Status(self) self.__status.configure({'name':'_status', 'parent':self}) except: msglog.exception() if self.is_bound_proxy(): self._line_handler.register_bound_proxy(self) CompositeNode.start(self) ActiveProxyAbstractClass.start(self) return
def configuration(self): config = CompositeNode.configuration(self) get_attribute(self, 'debug_lvl', config) get_attribute(self, 'lan_address', config) get_attribute(self, 'id_number', config) get_attribute(self, 'description', config) get_attribute(self, 'proxy_lan_addr', config) get_attribute(self, 'proxy_obj_ref', config) get_attribute(self, '__node_id__', config) ActiveProxyAbstractClass.configuration(self, config) return config
def stop(self): try: ActiveProxyAbstractClass.stop(self) if self._line_handler is not None: if self.is_bound_proxy(): self._line_handler.unregister_bound_proxy(self) else: self._line_handler.unregister_subscribed_proxy(self) except: msglog.exception() CompositeNode.stop(self) return
def configure(self, config): CompositeNode.configure(self, config) ActiveProxyAbstractClass.configure(self, config) set_attribute(self, 'debug_lvl', 1, config, as_boolean) set_attribute(self, 'lan_address', 0, config, int) set_attribute(self, 'id_number', 0, config, int) set_attribute(self, 'description', '', config) set_attribute(self, 'proxy_lan_addr', 0, config, int) set_attribute(self, 'proxy_obj_ref', 0, config, int) set_attribute(self, 'proxy_direction', 0, config, int) set_attribute(self, '__node_id__', self._node_id_, config) return
def __init__(self, line_handler=None): CompositeNode.__init__(self) ActiveProxyAbstractClass.__init__(self) EventProducerMixin.__init__(self) self.__cov_count = 0 self._line_handler = line_handler self._old_value = None self.__status = None self.proxy_lan_addr = None self.proxy_obj_ref = None self._value = None self._state = None self._get_via_cov = None return
def __init__(self, line_handler = None): CompositeNode.__init__(self) ActiveProxyAbstractClass.__init__(self) EventProducerMixin.__init__(self) self.__cov_count = 0 self._line_handler = line_handler self._old_value = None self.__status = None self.proxy_lan_addr = None self.proxy_obj_ref = None self._value = None self._state = None self._get_via_cov = None return
def change_of_value(self, event): ActiveProxyAbstractClass.change_of_value(self, event) self.event_generate(event) return