本文整理汇总了Python中mpx.lib.configure.set_attribute函数的典型用法代码示例。如果您正苦于以下问题:Python set_attribute函数的具体用法?Python set_attribute怎么用?Python set_attribute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_attribute函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configure
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
示例2: configure
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)
示例3: configure
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]})
示例4: configure
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 )
示例5: configure
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()
示例6: configure
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)
示例7: configure
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)
示例8: configure
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)
示例9: configure
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)
示例10: configuration
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
示例11: configure
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)
示例12: configuration
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
示例13: configure
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)
示例14: configure
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
示例15: configure
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)