示例#1
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'ion', self.parent, config, as_node)
     if not self.ion:
         self.ion = self.parent
     if hasattr(self, '_mutate'):
         self._mutate()
示例#2
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'port', 502, config, int)
     set_attribute(self, 'debug', 0, config, int)
     self.udp_port = self.port
     self.port = self  #intercept any calls to the port
     return
    def configuration(self):
        config = Formatter.configuration(self)
        get_attribute(self, 'generated_by', config, str)
        get_attribute(self, 'generated_by_namespace', config, str)
        get_attribute(self, 'generated_by_type', config, str)
        get_attribute(self, 'generated_by_signature', config, str)
# Not required according to Stephan Jones
#         get_attribute(self, 'configuration_template', config, str)
#         get_attribute(self, 'configuration_owner', config, str)
#         get_attribute(self, 'configuration_tag1', config, str)
#         get_attribute(self, 'configuration_tag2', config, str)
#         get_attribute(self, 'configuration_revision', config, str)
#         get_attribute(self, 'timezone_bias', config, str)
#         get_attribute(self, 'timezone_dst_bias', config, str)
#         get_attribute(self, 'timezone_dst_start', config, str)
#         get_attribute(self, 'timezone_dst_end', config, str)
        get_attribute(self, 'device_name', config, str)
        get_attribute(self, 'device_namespace', config, str)
        get_attribute(self, 'device_signature', config, str)
        get_attribute(self, 'device_type', config, str)
        get_attribute(self, 'device_configuration_template', config, str)
        get_attribute(self, 'device_configuration_owner', config, str)
        get_attribute(self, 'device_configuration_tag1', config, str)
        get_attribute(self, 'device_configuration_tag2', config, str)
        get_attribute(self, 'device_configuration_revision', config, str)
# Now programmatically calculated:
#         get_attribute(self, 'device_timezone_bias', config, str)
#         get_attribute(self, 'device_timezone_dst_bias', config, str)
#         get_attribute(self, 'device_timezone_dst_start', config, str)
#         get_attribute(self, 'device_timezone_dst_end', config, str)
        get_attribute(self, 'data_recorder_id', config, str)
        get_attribute(self, 'data_recorder_label', config, str)
        get_attribute(self, 'data_recorder_handle', config, str)
        set_attribute(self, 'add_smtp_envelope', config, int)
        return config
示例#4
0
 def configure(self, cd):
     super(TrapEngine, self).configure(cd)
     # set_attribute(self, 'adapter', 'all', cd)
     set_attribute(self, 'port', 162, cd, int)
     set_attribute(self, 'trap_log', '/services/logger/SNMP+Trap+Log', cd,
                   str)
     return
示例#5
0
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'log', self.parent.parent, config, as_node)
     set_attribute(self, 'gm_time', 1, config, as_boolean)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
示例#6
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/nodebrowser', config)
     set_attribute(self, 'secured', False, config, as_boolean)
     RequestHandler.configure(self, config)
示例#7
0
 def configure(self, config):
     ChangedPointGroup.configure(self, config)
     set_attribute(self, 'type', '', config)
     set_attribute(self, 'address', REQUIRED, config, int)
     for point in self.points:
         self.meta['types'].append(point['type'])
     return
示例#8
0
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'heating', REQUIRED, config, as_node)
     set_attribute(self, 'cooling', REQUIRED, config, as_node)
     set_attribute(self, 'temperature', REQUIRED, config, as_node)
     set_attribute(self, 'minimum', REQUIRED, config, float)
     set_attribute(self, 'maximum', REQUIRED, config, float)
示例#9
0
 def configure(self, config_dict):
     CompositeNode.configure(self, config_dict)
     set_attribute(self, "debug", 0, config_dict, int)
     # Default the period (between tickling our children) to 15
     # seconds.  Note:  This may be overriden for specific
     # applications.
     set_attribute(self, "period", 15, config_dict, int)
示例#10
0
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'log', self.parent.parent, config, as_node)
     set_attribute(self, 'gm_time', 1, config, as_boolean)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
示例#11
0
文件: mote.py 项目: mcruse/monotone
 def configure(self, config):
     _XbowConnection.configure(self, config)
     set_attribute(self, 'debug', 0, config, int)
     # create appropriate cache, linehandler and driver
     self.cache = XbowCache(self.timeout, self.scan_time)
     self.lh = SerialLineHandler(self.parent, self.debug)
     self.driver = XbowWsn(self.lh, self.cache)
示例#12
0
文件: egcp2.py 项目: mcruse/monotone
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'address', REQUIRED, config, int)
     set_attribute(self, 'line_handler', self.parent, config, as_node)
     for key in _register_map:
         node = _register_map[key][0]()
         node.configure({'parent':self,'register':key,'name':_register_map[key][1],'multiplier':_register_map[key][2]})
示例#13
0
文件: ppp.py 项目: mcruse/monotone
 def configure( self, config ):
     PPPChildNode.configure( self, config )
     set_attribute( self, 'user_id', '', config )
     set_attribute( self, 'password', '', config )
     set_attribute( self, 'local_ip', '', config )
     set_attribute( self, 'client_ip', '', config )
     set_attribute( self, 'enable_autoppp', 0, config, int )
示例#14
0
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'heating', REQUIRED, config, as_node)
     set_attribute(self, 'cooling', REQUIRED, config, as_node)
     set_attribute(self, 'temperature', REQUIRED, config, as_node)
     set_attribute(self, 'minimum', REQUIRED, config, float)
     set_attribute(self, 'maximum', REQUIRED, config, float)
示例#15
0
文件: server.py 项目: mcruse/monotone
 def configure(self, config):
     _GenericPoint.configure(self, config)
     set_attribute(self, 'type', REQUIRED, config)
     set_attribute(self, 'length', REQUIRED, config, int)
     set_attribute(self, 'word_order', 'Network Order', config, str)
     set_attribute(self, 'byte_order', 'Network Order', config, str)
     set_attribute(self, 'bit_order', 'Network Order', config, str)
示例#16
0
 def configure(self, config_dict):
     CompositeNode.configure(self, config_dict)
     set_attribute(self, 'debug', 0, config_dict, int)
     # Default the period (between tickling our children) to 15
     # seconds.  Note:  This may be overriden for specific
     # applications.
     set_attribute(self, 'period', 15, config_dict, int)
示例#17
0
 def configure(self, config):
     if self.debug:
         msglog.log('EnergywiseManager:', msglog.types.INFO,
                    'Inside configure')
     CompositeNode.configure(self, config)
     set_attribute(self, 'debug', 0, config, int)
     return
示例#18
0
 def configuration(self):
     config = CompositeNode.configuration(self)
     get_attribute(self,'id',config)
     get_attribute(self,'column',config,str)
     get_attribute(self,'spaces',config,str)
     set_attribute(self,'conversion',float,config,_name)
     return config
示例#19
0
 def configure(self, cd):
     super(TrapEngine, self).configure(cd)
     # set_attribute(self, 'adapter', 'all', cd)
     set_attribute(self, 'port', 162, cd, int)
     set_attribute(self, 'trap_log', '/services/logger/SNMP+Trap+Log', cd,
                   str)
     return
示例#20
0
 def configure(self, config):
     _GenericPoint.configure(self, config)
     set_attribute(self, 'type', REQUIRED, config)
     set_attribute(self, 'length', REQUIRED, config, int)
     set_attribute(self, 'word_order', 'Network Order', config, str)
     set_attribute(self, 'byte_order', 'Network Order', config, str)
     set_attribute(self, 'bit_order', 'Network Order', config, str)
示例#21
0
 def configure(self, config):
     _XbowConnection.configure(self, config)
     set_attribute(self, 'debug', 0, config, int)
     # create appropriate cache, linehandler and driver
     self.cache = XbowCache(self.timeout, self.scan_time)
     self.lh = SerialLineHandler(self.parent, self.debug)
     self.driver = XbowWsn(self.lh, self.cache)
示例#22
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'timeout', 1.0, config, float)
     set_attribute(self, 'debug', 0, config, int)
     self.port = self.parent
     if not self.port.is_open():
         self.port.open()
示例#23
0
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'server_url', REQUIRED, config)
     set_attribute(self, 'node', REQUIRED, config)
     set_attribute(self, 'period', 30, config, int)
     set_attribute(self, 'connection', '/services/network', config, as_node)
     set_attribute(self, 'timeout', 60, config, int)
示例#24
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'debug', debug, config, as_boolean)
     set_attribute(self, 'post', REQUIRED, config, str)
     set_attribute(self, 'server', REQUIRED, config, str)
     set_attribute(self, 'action', REQUIRED, config, str)
     set_attribute(self, 'ttl', 1.0, config, float)
示例#25
0
 def configure(self, config):
     PPPChildNode.configure(self, config)
     set_attribute(self, 'user_id', '', config)
     set_attribute(self, 'password', '', config)
     set_attribute(self, 'local_ip', '', config)
     set_attribute(self, 'client_ip', '', config)
     set_attribute(self, 'enable_autoppp', 0, config, int)
示例#26
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'ion', self.parent, config, as_node)
     if not self.ion:
         self.ion = self.parent
     if hasattr(self, '_mutate'):
         self._mutate()
示例#27
0
 def configure(self, config):
     Formatter.configure(self, config)
     set_attribute(self,'data_delimiter', ',', config)
     set_attribute(self,'header_delimiter', self.data_delimiter, config, str)
     set_attribute(self,'prefix', '', config)
     set_attribute(self,'suffix', '', config)
     set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config)
示例#28
0
 def configure(self, cd):
     CompositeNode.configure(self, cd)
     set_attribute(self, 'source',self.source, cd, str)
     set_attribute(self, 'device_link', None, cd, str) #url of Devices node
     set_attribute(self, 'discover_mode', self.discover_mode, cd, str)
     set_attribute(self, '__node_id__',self._node_id, cd, str)
     set_attribute(self, 'bacnet_datatype', 'real', cd, str)
示例#29
0
文件: nodes.py 项目: mcruse/monotone
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/nodebrowser', config)
     self.secured = as_internal_node("/services").secured
     RequestHandler.configure(self, config)
示例#30
0
 def configure(self,config):
     ChangedPointGroup.configure(self,config)
     set_attribute(self,'type','',config)
     set_attribute(self,'address',REQUIRED,config,int)
     for point in self.points:
         self.meta['types'].append(point['type'])
     return
示例#31
0
 def configure(self,config):
     if self.debug:
         msglog.log('EnergywiseManager:', msglog.types.INFO,
                    'Inside configure' )
     CompositeNode.configure(self, config)
     set_attribute(self, 'debug', 0, config, int)
     return
示例#32
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'debug', debug, config, as_boolean)
     set_attribute(self,'device_name',REQUIRED,config, str)
     set_attribute(self,'unit_number',REQUIRED, config, int)
     set_attribute(self,'controller_type',None, config, str)
     set_attribute(self,'controller_version',None, config, str)
示例#33
0
文件: device.py 项目: mcruse/monotone
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self,'debug', debug, config, as_boolean)
     set_attribute(self,'post',REQUIRED,config, str)
     set_attribute(self,'server',REQUIRED, config, str)
     set_attribute(self,'action',REQUIRED, config, str)
     set_attribute(self,'ttl',1.0, config, float)
示例#34
0
 def configure(self, cd):
     CompositeNode.configure(self, cd)
     set_attribute(self, 'source', self.source, cd, str)
     set_attribute(self, 'device_link', None, cd, str)  #url of Devices node
     set_attribute(self, 'discover_mode', self.discover_mode, cd, str)
     set_attribute(self, '__node_id__', self._node_id, cd, str)
     set_attribute(self, 'bacnet_datatype', 'real', cd, str)
示例#35
0
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'server_url', REQUIRED, config)
     set_attribute(self, 'node', REQUIRED, config)
     set_attribute(self, 'period', 30, config, int)
     set_attribute(self,'connection','/services/network',config,as_node)
     set_attribute(self,'timeout',60,config,int)
示例#36
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'url', '', config, str)
     set_attribute(self, 'user', '', config, str)
     set_attribute(self, 'password', '', config, str)
     set_attribute(self, 'spreadsheet', self.name, config, str) #spreadsheet name
     set_attribute(self, 'worksheet', '', config, str)
示例#37
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, "timeout", 1.0, config, float)
     set_attribute(self, "debug", 0, config, int)
     self.port = self.parent
     if not self.port.is_open():
         self.port.open()
示例#38
0
 def configure(self,config):
     CompositeNode.configure(self,config)
     set_attribute(self, 'port', 502, config, int)
     set_attribute(self, 'debug', 0, config, int)
     self.udp_port = self.port
     self.port = self #intercept any calls to the port
     return
示例#39
0
 def configure(self, config):
     _Register.configure(self, config)
     set_attribute(self, 'minimum', None, config, self._float_or_none)
     set_attribute(self, 'maximum', None, config, self._float_or_none)
     # Only check boundries on every set if the boundries
     # are set, otherwise do not hide super's set.
     if self.minimum != None or self.maximum != None:
         self._set = self._set_with_boundry_check
示例#40
0
 def configure(self, cd):
     CompositeNode.configure(self, cd)
     set_attribute(self, '__node_id__', self._node_id, cd, str)
     set_attribute(self, 'source', self.parent.source, cd, str)
     #set_attribute(self, 'default',None, cd, str)
     set_attribute(self, 'link', self.link, cd, str)
     set_attribute(self, 'bacnet_datatype', 'auto', cd, str)
     set_attribute(self, 'force', False, cd, bool)
示例#41
0
 def configure(self, cd):
     super(SNMPv3, self).configure(cd)
     set_attribute(self, 'username', REQUIRED, cd)
     set_attribute(self, 'authentication_key', '', cd)
     set_attribute(self, 'privacy_key', '', cd)
     set_attribute(self, 'authentication_protocol', 'usmNoAuthProtocol', cd)
     set_attribute(self, 'privacy_protocol', 'usmNoPrivProtocol', cd)
     return
示例#42
0
 def configure(self, config):
     set_attribute(self, 'request_path', REQUIRED, config)
     set_attribute(self, 'gm_time', 0, config, as_boolean)
     RequestHandler.configure(self, config)
     self.time = _TimeStore(self)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
示例#43
0
 def configure(self, dict):
     _Value.configure(self, dict)
     set_attribute(self, 'scale_or_enum', REQUIRED, dict)
     if type(self.scale_or_enum) == str:  #eonvert to list of words
         if self.scale_or_enum[0] == '[':  #self discovered
             self.scale_or_enum = eval(self.scale_or_enum)
         else:  #static
             self.scale_or_enum = string.split(self.scale_or_enum, ';')
示例#44
0
 def configuration(self):
     cd = super(SNMPv3, self).configuration()
     set_attribute(self, 'username', cd)
     get_attribute(self, 'authentication_key', cd)
     get_attribute(self, 'privacy_key', cd)
     get_attribute(self, 'authentication_protocol', cd)
     get_attribute(self, 'privacy_protocol', cd)
     return cd
示例#45
0
 def configure(self,config):
     CompositeNode.configure(self,config)
     set_attribute(self,'points',REQUIRED,config)
     # self._points will later be built in same order.
     # this needs to be done here so that parent's start
     # doesn't have to happend before my start is called.
     for point in self.points:
         self.meta['names'].append(point['name'])
示例#46
0
 def configure(self, cd):
     super(RemoteWebServiceOp, self).configure(cd)
     set_attribute(self, 'ttl', 60, cd, int)
     set_attribute(self, 'read_op', '', cd)
     set_attribute(self, 'read_params', [], cd)
     set_attribute(self, 'write_op', '', cd)
     set_attribute(self, 'write_params', [], cd)
     return
示例#47
0
文件: server.py 项目: mcruse/monotone
 def configure(self, config):
     _Register.configure(self, config)
     set_attribute(self, 'minimum', None, config, self._float_or_none)
     set_attribute(self, 'maximum', None, config, self._float_or_none)
     # Only check boundries on every set if the boundries 
     # are set, otherwise do not hide super's set.
     if self.minimum != None or self.maximum != None:
         self._set = self._set_with_boundry_check 
示例#48
0
 def configure(self, cd):
     CompositeNode.configure(self, cd)
     set_attribute(self, '__node_id__',self._node_id, cd, str)
     set_attribute(self, 'source',self.parent.source, cd, str)
     #set_attribute(self, 'default',None, cd, str)
     set_attribute(self, 'link', self.link, cd, str)
     set_attribute(self, 'bacnet_datatype', 'auto', cd, str)
     set_attribute(self, 'force', False, cd, bool)
示例#49
0
 def configure(self, cd):
     super(RemoteWebServiceOp, self).configure(cd)
     set_attribute(self, 'ttl', 60, cd, int)
     set_attribute(self, 'read_op', '', cd)
     set_attribute(self, 'read_params', [], cd)
     set_attribute(self, 'write_op', '', cd)
     set_attribute(self, 'write_params', [], cd)
     return
示例#50
0
    def configure(self, config):
        set_attribute(self, 'object_alias', REQUIRED, config)
        set_attribute(self, 'object_name', 'UNKNOWN', config)
        set_attribute(self, 'can_query', '1', config)
        set_attribute(self, 'is_enabled', '1', config)
        set_attribute(self, 'object_lifetime', 'Per Request', config)

        SubServiceNode.configure(self, config)
示例#51
0
 def configure(self, config):
     Formatter.configure(self, config)
     set_attribute(self, 'data_delimiter', ',', config)
     set_attribute(self, 'header_delimiter', self.data_delimiter, config,
                   str)
     set_attribute(self, 'prefix', '', config)
     set_attribute(self, 'suffix', '', config)
     set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config)