本文整理汇总了Python中ivy_msg_interface.IvyMessagesInterface.unbind方法的典型用法代码示例。如果您正苦于以下问题:Python IvyMessagesInterface.unbind方法的具体用法?Python IvyMessagesInterface.unbind怎么用?Python IvyMessagesInterface.unbind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ivy_msg_interface.IvyMessagesInterface
的用法示例。
在下文中一共展示了IvyMessagesInterface.unbind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PlotPanel
# 需要导入模块: from ivy_msg_interface import IvyMessagesInterface [as 别名]
# 或者: from ivy_msg_interface.IvyMessagesInterface import unbind [as 别名]
#.........这里部分代码省略.........
if use_as_x:
self.x_axis = self.plots[ac_id][message][field]
def CalcMinMax(self, plot):
if not self.auto_scale: return
for x in plot.data:
self.max = max(self.max, x)
self.min = min(self.min, x)
self.frame.SetMinMax(self.min, self.max)
def FindPlotName(self, ivy_id):
for ac_id in self.plots:
for msg in self.plots[ac_id]:
for field in self.plots[ac_id][msg]:
if self.plots[ac_id][msg][field].id == ivy_id:
return (ac_id, msg, field)
return (None, None, None)
def FindPlot(self, ivy_id):
(ac_id, msg, field) = self.FindPlotName(ivy_id)
if ac_id is None:
return None
return self.plots[ac_id][msg][field]
def RemovePlot(self, ivy_id):
(ac_id, msg, field) = self.FindPlotName(ivy_id)
if ac_id is None:
return
if (self.x_axis is not None) and (self.x_axis.id == ivy_id):
self.x_axis = None
self.ivy_interface.unbind(ivy_id)
del self.plots[ac_id][msg][field]
if len(self.plots[ac_id][msg]) == 0:
del self.plots[ac_id][msg]
def OffsetPlot(self, ivy_id, offset):
plot = self.FindPlot(ivy_id)
if plot is None:
return
plot.SetOffset(offset)
print('panel value: %.2f' % value)
CalcMinMax(plot)
def ScalePlot(self, ivy_id, offset):
plot = self.FindPlot(ivy_id)
if plot is None:
return
plot.SetScale(offset)
CalcMinMax(plot)
def SetRealTime(self, ivy_id, value):
plot = self.FindPlot(ivy_id)
if plot is None:
return
plot.SetRealTime(value)
def SetXAxis(self, ivy_id):
plot = self.FindPlot(ivy_id)
if plot is None:
return