Ejemplo n.º 1
0
 def __init__(self):
     CompositeNode.__init__(self)
     ProxyAbstractClass.__init__(self)
     self.debug = 0
     self.value = None
     self.buffer = None
     self.last_set_exception = None
Ejemplo n.º 2
0
 def __init__(self):
     CompositeNode.__init__(self)
     ProxyAbstractClass.__init__(self)
     self.debug = 0
     self.value = None
     self.buffer = None
     self.last_set_exception = None
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 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
Ejemplo n.º 8
0
 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)
Ejemplo n.º 9
0
 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
Ejemplo n.º 10
0
 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
Ejemplo n.º 11
0
 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 = {}
Ejemplo n.º 12
0
 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 = {}
Ejemplo n.º 13
0
 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
Ejemplo n.º 14
0
 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
Ejemplo n.º 15
0
 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
Ejemplo n.º 16
0
 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