本文整理汇总了Python中HardwareRepository.BaseHardwareObjects.Equipment._init方法的典型用法代码示例。如果您正苦于以下问题:Python Equipment._init方法的具体用法?Python Equipment._init怎么用?Python Equipment._init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HardwareRepository.BaseHardwareObjects.Equipment
的用法示例。
在下文中一共展示了Equipment._init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _init
# 需要导入模块: from HardwareRepository.BaseHardwareObjects import Equipment [as 别名]
# 或者: from HardwareRepository.BaseHardwareObjects.Equipment import _init [as 别名]
def _init(self):
self.currentResolution = None
self.currentDistance = None
self.connect("equipmentReady", self.equipmentReady)
self.connect("equipmentNotReady", self.equipmentNotReady)
self.distance_chan = self.getChannelObject("distance")
self.resolution_chan = self.getChannelObject("resolution")
self.minimum_res_chan = self.getChannelObject("minimum_resolution")
self.maximum_res_chan = self.getChannelObject("maximum_resolution")
self.minimum_dist_chan = self.getChannelObject("minimum_distance")
self.state_chan = self.getChannelObject("state")
self.stop_command = self.getCommandObject("stop")
self.distance_chan.connectSignal("update", self.distanceChanged)
self.resolution_chan.connectSignal("update", self.resolutionChanged)
self.minimum_res_chan.connectSignal("update", self.minimumResolutionChanged)
self.maximum_res_chan.connectSignal("update", self.maximumResolutionChanged)
self.minimum_dist_chan.connectSignal("update", self.minimumDistanceChanged)
self.state_chan.connectSignal("update", self.stateChanged)
self.currentDistance = self.distance_chan.getValue()
self.currentResolution = self.resolution_chan.getValue()
return Equipment._init(self)