本文整理汇总了Python中host.Host.configure方法的典型用法代码示例。如果您正苦于以下问题:Python Host.configure方法的具体用法?Python Host.configure怎么用?Python Host.configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类host.Host
的用法示例。
在下文中一共展示了Host.configure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configure
# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import configure [as 别名]
def configure(self, config):
if not self.port_map:
config['ncounters'] = 4
config['nDIs'] = 4
config['nrelays'] = 2
config['ndallas_busses'] = 4
config['nGPIOs'] = 1
config['port_map'] = {'console':'/dev/ttyS0',
'com1':'/dev/ttyS8',
'com2':'/dev/ttyS9',
'com3':'/dev/ttySa',
'com4':'/dev/ttySb',
'com5':'/dev/ttySc',
'com6':'/dev/ttySd'}
config['eth_map'] = {'eth0':'eth0',
'eth1':'eth1'}
config['modem_map'] = {}
Host.configure(self, config)
示例2: configure
# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import configure [as 别名]
def configure(self, config):
#print 'configure megatron'
if not self.port_map:
config['ncounters'] = 4
config['nAIs'] = 4
config['nAOs'] = 3
config['nDIs'] = 4
config['nrelays'] = 2
config['ndallas_busses'] = 2
config['nCAN_busses'] = 1
config['nGPIOs'] = 0
config['port_map'] = {'console':'/dev/ttyS0',
'com1':'/dev/ttyS2',
'com2':'/dev/ttyS3',
'com3':'/dev/ttyS4',
'com4':'/dev/ttyS5',
'com5':'/dev/ttyS6',
'com6':'/dev/ttyS7'}
config['eth_map'] = {'eth0':'eth0',
'eth1':'eth1'}
Host.configure(self, config)