def __init__(self): CompositeNode.__init__(self) ProxyAbstractClass.__init__(self) self.debug = 0 self.value = None self.buffer = None self.last_set_exception = None
def configuration(self): config = CompositeNode.configuration(self) get_attribute(self, 'register', config, str) get_attribute(self, 'read_only', config, str) get_attribute(self, 'debug', config, str) get_attribute(self, 'offset', config, str) ProxyAbstractClass.configuration(self, config) return config
def configuration(self): cd = CompositeNode.configuration(self) get_attribute(self, 'discovered', cd, str) get_attribute(self, '__node_id__', cd) get_attribute(self, 'debug', cd, str) get_attribute(self, 'instance', cd, int) if self._parent_device.is_proxy(): ProxyAbstractClass.configuration(self, cd) return cd
def configure(self, cd): CompositeNode.configure(self, cd) set_attribute(self, 'discovered', self.discovered, cd, int) set_attribute(self, 'debug', self.debug, cd, int) set_attribute(self, '__node_id__', self.__node_id__, cd, str) set_attribute(self, 'instance', self.instance, cd, int) self._parent_device = self.parent if self.is_proxy(): ProxyAbstractClass.configure(self, cd)
def configure(self, cd): CompositeNode.configure(self, cd) set_attribute(self, 'discovered', self.discovered, cd, int) set_attribute(self, 'debug', self.debug, cd, int) set_attribute(self, '__node_id__',self.__node_id__, cd, str) set_attribute(self, 'instance',self.instance, cd, int) self._parent_device = self.parent if self.is_proxy(): ProxyAbstractClass.configure(self, cd)
def configure(self, config): if self.debug: print 'Configure modbus point' CompositeNode.configure(self, config) set_attribute(self, 'register', REQUIRED, config, int) self.offset = self.register - self.base_register() set_attribute(self, 'read_only', 1, config, int) set_attribute(self, 'debug', 1, config, int) set_attribute(self, 'length', 1, config, int) ProxyAbstractClass.configure(self, config) if self.debug: print 'Configured modbus point', self
def __init__(self): CompositeNode.__init__(self) AutoDiscoveredNode.__init__(self) ProxyAbstractClass.__init__(self) self.instance = None self.object_identifier = None self.debug = DEBUG self._children_have_been_discovered = 0 self.running = 0 self._last_exception = None self.__node_id__ = self._node_def_id self._batch_managers = {}
def start(self): if self.running == 0: self.cache = self.parent.cache self.obj_type = self._object_type if self.instance is None: #must not have been autodiscovered, get it from xml self.instance = self.get_child('object_identifier').instance self.object_identifier = BACnetObjectIdentifier(self.obj_type, self.instance) if (85 in self._required_properties) or \ (property.PresentValue in self._required_properties): self.get = self._get CompositeNode.start(self) self.running = 1 #placed here to prevent CompositeNode.start from autodiscovering if self.is_proxy(): ProxyAbstractClass.start(self) #take over the get and set methods
def start(self): if self.running == 0: self.cache = self.parent.cache self.obj_type = self._object_type if self.instance is None: #must not have been autodiscovered, get it from xml self.instance = self.get_child('object_identifier').instance self.object_identifier = BACnetObjectIdentifier( self.obj_type, self.instance) if (85 in self._required_properties) or \ (property.PresentValue in self._required_properties): self.get = self._get CompositeNode.start(self) self.running = 1 #placed here to prevent CompositeNode.start from autodiscovering if self.is_proxy(): ProxyAbstractClass.start( self) #take over the get and set methods
def start(self): if self.debug: print 'Start: ', self.name try: group = self.parent.get_group_base_register() if group is None: group = 0 self.offset = self.register + group - self.base_register() if self.offset < 0: raise EInvalidValue('offset out of range for: ', self.name) if self.read_only == 0: self.set = self._set for i in range(0, self.length): #add self to lookup table self.parent.add_register_to_map_for(self.offset + self.base_register() + i, self) except: msglog.exception() CompositeNode.start(self) ProxyAbstractClass.start(self) if self.debug: print 'Started ', self.name
def start(self): if self.debug: print 'Start: ', self.name try: group = self.parent.get_group_base_register() if group is None: group = 0 self.offset = self.register + group - self.base_register() if self.offset < 0: raise EInvalidValue('offset out of range for: ', self.name) if self.read_only == 0: self.set = self._set for i in range(0, self.length): #add self to lookup table self.parent.add_register_to_map_for( self.offset + self.base_register() + i, self) except: msglog.exception() CompositeNode.start(self) ProxyAbstractClass.start(self) if self.debug: print 'Started ', self.name